{"id":37541,"date":"2016-09-11T17:51:54","date_gmt":"2016-09-11T22:51:54","guid":{"rendered":"http:\/\/sierrablogsite.wordpress.com\/?p=370"},"modified":"2016-09-11T17:51:54","modified_gmt":"2016-09-11T22:51:54","slug":"while-loops-3","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/while-loops-3\/","title":{"rendered":"While loops"},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/sierrablogsite.wordpress.com\/2016\/09\/11\/while-loops\/\"><a href=\"https:\/\/sierrablogsite.wordpress.com\">Sierra&amp;#039;s Blog<\/a><\/a><\/em><br \/><\/p>\n<p>While loops are used to tell python \u00a0<em>I want to do this until this happens\u00a0<\/em>this is how you can use it:<\/p>\n<p>while expression:<\/p>\n<p>statement<\/p>\n<p>&nbsp;<\/p>\n<p>for example,\u00a0I made a program that guesses the number in which you&#8217;re thinking based on questions. This program uses all the stuffs that we&#8217;ve seen till now, try to understand it, it will help you a lot because this way you&#8217;ll see the way I program and maybe you&#8217;ll start thinking in other possible ways to come up with the same result:<\/p>\n<p><img class=\"alignnone size-full wp-image-388\" src=\"https:\/\/sierrablogsite.files.wordpress.com\/2016\/09\/while.png?w=702\" alt=\"while.png\"   \/><\/p>\n<p>The functions of the while loop is to keep repeating the code until the expression becomes FALSE and since the while expression is: while the Min number isn&#8217;t equal as the Max number keep asking the user, the program will only stop until it finds the number that you were thinking.<\/p>\n<p>Here&#8217;s a video tutorial from\u00a0<a class=\"g-hovercard yt-uix-sessionlink      spf-link \" href=\"https:\/\/www.youtube.com\/channel\/UC4a-Gbdw7vOaccHmFo40b9g\">Khan Academy<\/a> explaining how to use the while loops:<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe class='youtube-player' type='text\/html' width='702' height='425' src='https:\/\/www.youtube.com\/embed\/D0Nb2Fs3Q8c?version=3&#038;rel=1&%23038;fs=1&%23038;autohide=2&%23038;showsearch=0&%23038;showinfo=1&%23038;iv_load_policy=1&%23038;wmode=transparent' allowfullscreen='true' style='border:0;'><\/iframe><\/div>\n<p>&nbsp;<\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/sierrablogsite.wordpress.com\/370\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/sierrablogsite.wordpress.com\/370\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=sierrablogsite.wordpress.com&#038;blog=115557456&%23038;post=370&%23038;subd=sierrablogsite&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at Sierra&amp;#039;s Blog While loops are used to tell python \u00a0I want to do this until this happens\u00a0this is how you can use it: while expression: statement &nbsp; for example,\u00a0I made a program that guesses the number in which you&#8217;re thinking based on questions. This program uses all the stuffs that we&#8217;ve seen &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/while-loops-3\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">While loops<\/span><\/a><\/p>\n","protected":false},"author":45,"featured_media":388,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[24,26,198],"class_list":["post-37541","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-python","tag-sin-categoria","tag-while-loops"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37541","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=37541"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37541\/revisions"}],"predecessor-version":[{"id":38120,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37541\/revisions\/38120"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=37541"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=37541"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=37541"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}