Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101winter2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101winter2015/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":3412,"date":"2015-02-04T12:36:45","date_gmt":"2015-02-04T18:36:45","guid":{"rendered":"http:\/\/gilrg18.withknown.com\/2015\/pick-a-number"},"modified":"2015-02-04T12:36:45","modified_gmt":"2015-02-04T18:36:45","slug":"pick-a-number-3","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101winter2015\/2015\/pick-a-number-3\/","title":{"rendered":"Pick a number"},"content":{"rendered":"
\n

#333333; line-height: 1.5em !important;”>I learned how to use the while function in python thanks to this WSQ. Its easier to do a “while” than a lot of “ifs”, thats why i made my code with a single while function. <\/p>\n

#333333; line-height: 1.5em !important;”>I used this links that showed me how to get a random number and how to use the while function in python.<\/p>\n

#333333; line-height: 1.5em !important;”>#4c93cb<\/a>; text-decoration: none;” href=”http:\/\/stackoverflow.com\/questions\/5555712\/generate-a-random-number”>http:\/<\/wbr>\/<\/wbr>stackoverflow.com\/<\/wbr>questions\/<\/wbr>5555712\/<\/wbr>generate-a-random-number<\/p>\n

#333333; line-height: 1.5em !important;”>#4c93cb<\/a>; text-decoration: none;” href=”http:\/\/www.tutorialspoint.com\/python\/python_loops.htm”>http:\/<\/wbr>\/<\/wbr>www.tutorialspoint.com\/<\/wbr>python\/<\/wbr>python_loops.htm<\/p>\n

#333333; line-height: 1.5em !important;”>Here’s my code:<\/p>\n

#333333; line-height: 1.5em !important;”>#8cbf99<\/a>; text-decoration: none; font-family: ‘Helvetica Neue’, Helvetica, Arial, sans-serif; padding: 3px; font-size: 1em; background-repeat: repeat-x;” href=”http:\/\/gilrg18.withknown.com\/tag\/Gilberto” rel=”tag”>#Gilberto<\/a> Rogel García a01630171<\/p>\n

#333333; line-height: 1.5em !important;”>import random<\/p>\n

#333333; line-height: 1.5em !important;”>value= random.randint(1,100)<\/p>\n

#333333; line-height: 1.5em !important;”>tries=0<\/p>\n

#333333; line-height: 1.5em !important;”>num= int(input(“Guess a number from 1 to 100:”))<\/p>\n

#333333; line-height: 1.5em !important;”>while num != value: ###the while funtion starts here, i put “!=” so when the number is different from value the while function will take place.<\/p>\n

#333333; line-height: 1.5em !important;”>if num>value :<\/p>\n

#333333; line-height: 1.5em !important;”>print (num, “is too high”)<\/p>\n

#333333; line-height: 1.5em !important;”>num= int(input(“Try again:”))<\/p>\n

#333333; line-height: 1.5em !important;”>tries=tries+1<\/p>\n

#333333; line-height: 1.5em !important;”>elif num<value :<\/p>\n

#333333; line-height: 1.5em !important;”>print (num, “is too low”)<\/p>\n

#333333; line-height: 1.5em !important;”>num= int(input(“Try again:”))<\/p>\n

#333333; line-height: 1.5em !important;”>tries= tries+1<\/p>\n

#333333; line-height: 1.5em !important;”>tries= tries +1 ###here is where the while function ends, when the number is equal to value.<\/p>\n

#333333; line-height: 1.5em !important;”>print(“Congratulations!, The right number is”,value)<\/p>\n

#333333; line-height: 1.5em !important;”>print(“It took you” ,tries, “tries to win”)<\/p>\n

#333333; line-height: 1.5em !important;”>#8cbf99<\/a>; text-decoration: none; font-family: ‘Helvetica Neue’, Helvetica, Arial, sans-serif; padding: 3px; font-size: 1em; background-repeat: repeat-x;” href=”http:\/\/gilrg18.withknown.com\/tag\/TC1014″ rel=”tag”>#TC1014<\/a> #8cbf99<\/a>; text-decoration: none; font-family: ‘Helvetica Neue’, Helvetica, Arial, sans-serif; padding: 3px; font-size: 1em; background-repeat: repeat-x;” href=”http:\/\/gilrg18.withknown.com\/tag\/WSQ06″ rel=”tag”>#WSQ06<\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

#333333; line-height: 1.5em !important;”>I learned how to use the while function in python thanks to this WSQ. Its easier to do a “while” than a lot of “ifs”, thats why i made my code with a single while function. #333333; line-height:… Continue reading →<\/span><\/a><\/p>\n","protected":false},"author":55,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3,25],"tags":[144,181,182,183,185,45,184,167],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/3412"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/users\/55"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/comments?post=3412"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/3412\/revisions"}],"predecessor-version":[{"id":3413,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/posts\/3412\/revisions\/3413"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/media?parent=3412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/categories?post=3412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101winter2015\/wp-json\/wp\/v2\/tags?post=3412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}