<\/a><\/p>\n I was asked to create a game that makes you guess a number between 1 and 100.<\/p>\n So I had thes keypoints:<\/p>\n The main function I used was the for loops to store them as a list in a variable, where later another variable will take a random item from the list:<\/p>\n <\/a><\/p>\n r = []<\/span> It basicly store every value of e in r as a list.<\/span><\/p>\n Then, I had to make the computer say the user if the nomber was bigger o lower than the number, I used two conditionals inside a while loop:<\/p>\n <\/a><\/p>\n while (c != rn):<\/span> The while<\/span> is for allow the user put another values for x, the conditionals<\/span> tells the user if his number was greater or lower than the number, and the counter i<\/span> makes the number of turns the user took to win.<\/span><\/p>\n It was easy to do, and it was funny because at first, I tried to do whit a while instead a for, so I make my life easier<\/p>\n <\/p>\n <\/a> <\/p>\n","protected":false},"excerpt":{"rendered":" I was asked to create a game that makes you guess a number between 1 and 100. So I had thes keypoints: If it inputs a lower number let know the user it If it inputs a biggernumber let know the user it Say in … Continúa leyendo Pickanumber WSQ06<\/span><\/a><\/p>\n","protected":false},"author":191,"featured_media":23590,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[45,167,39],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/23594"}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/users\/191"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=23594"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/23594\/revisions"}],"predecessor-version":[{"id":23595,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/23594\/revisions\/23595"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media\/23590"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=23594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=23594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=23594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
\nfor e in range (1,101,1):<\/span>
\n\u00a0 \u00a0 \u00a0 \u00a0r.append(e)<\/span><\/p>\n
\n\u00a0 \u00a0 \u00a0if ( c < rn ):<\/span>
\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print (“Bigger!”)<\/span>
\n\u00a0 \u00a0 \u00a0elif ( c > rn ):<\/span>
\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 print (“Lower!”)<\/span>
\n\u00a0 \u00a0 \u00a0 c = input (“Ooops, try again “)<\/span>
\n\u00a0 \u00a0 \u00a0 c = int(c)<\/span>
\n\u00a0 \u00a0 \u00a0 i = (i + 1)<\/span><\/p>\n