{"id":37688,"date":"2016-09-13T17:42:56","date_gmt":"2016-09-13T22:42:56","guid":{"rendered":"http:\/\/a9810blog.wordpress.com\/?p=308"},"modified":"2016-09-13T17:42:56","modified_gmt":"2016-09-13T22:42:56","slug":"more-loops-loops-everywhere-for-loop","status":"publish","type":"post","link":"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/more-loops-loops-everywhere-for-loop\/","title":{"rendered":"More loops, loops everywhere, FOR LOOP."},"content":{"rendered":"<p class=\"syndicated-attribution\"><em> --Originally published at <a href=\"https:\/\/a9810blog.wordpress.com\/2016\/09\/13\/more-loops-loops-everywhere-for-loop\/\"><a href=\"https:\/\/a9810blog.wordpress.com\">Newbie Programmer<\/a><\/a><\/em><br \/><\/p>\n<figure data-shortcode=\"caption\" id=\"attachment_310\" style=\"width: 500px\" class=\"wp-caption alignnone\"><img class=\"alignnone size-full wp-image-310\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/giphy5.gif?w=702\" alt=\"giphy\"   \/><figcaption class=\"wp-caption-text\">Me when i see a loop<\/figcaption><\/figure>\n<p>Welcome to another post, and another loop.<\/p>\n<p>In this case we explain the <strong>FOR<\/strong> loop. The <strong>for loop<\/strong> is used for the same things as the <a href=\"https:\/\/a9810blog.wordpress.com\/2016\/09\/13\/while-loop\/\">While Loop,<\/a> but the <strong>for loop<\/strong> is for finite loops.<\/p>\n<p>You can use <a href=\"https:\/\/a9810blog.wordpress.com\/2016\/09\/13\/lists\/\">Lists.<\/a><\/p>\n<p><img class=\"alignnone size-full wp-image-340\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/untitled.jpg?w=702\" alt=\"untitled\"   \/><img class=\"alignnone size-full wp-image-341\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/untitled2.jpg?w=702\" alt=\"untitled2\"   \/><\/p>\n<p>If you put, for example the print (&#8220;A value&#8221;) into the loop, the words &#8220;A value&#8221; can be printed with every number.<\/p>\n<p><img class=\"alignnone size-full wp-image-329\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/f3.jpg?w=702\" alt=\"f3\"   \/><img class=\"alignnone size-full wp-image-330\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/f4.jpg?w=702\" alt=\"f4\"   \/><\/p>\n<p><strong>Range function.<\/strong><\/p>\n<p><img class=\"alignnone size-full wp-image-331\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/f5.jpg?w=702\" alt=\"f5\"   \/><img class=\"alignnone size-full wp-image-332\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/f6.jpg?w=702\" alt=\"f6\"   \/><\/p>\n<p>If you put a third number in the (), this number activates a function that says steps of 2 in the range.<\/p>\n<p><img class=\"alignnone size-full wp-image-333\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/f7.jpg?w=702\" alt=\"f7\"   \/><img class=\"alignnone size-full wp-image-334\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/f8.jpg?w=702\" alt=\"f8\"   \/><\/p>\n<p>And you can use slices (strings) for the <strong>for loops.<\/strong><\/p>\n<p><img class=\"alignnone size-full wp-image-335\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/f9.jpg?w=702\" alt=\"f9\"   \/><img class=\"alignnone size-full wp-image-336\" src=\"https:\/\/a9810blog.files.wordpress.com\/2016\/09\/f10.jpg?w=702\" alt=\"f10\"   \/><\/p>\n<p>Source: <a href=\"https:\/\/www.youtube.com\/watch?v=xtXexPSfcZg&amp;list=PLQVvvaa0QuDe8XSftW-RAxdo6OmaeL85M&amp;index=7\">https:\/\/www.youtube.com\/watch?v=xtXexPSfcZg&amp;list=PLQVvvaa0QuDe8XSftW-RAxdo6OmaeL85M&amp;index=7<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p><br \/>  <a rel=\"nofollow\" href=\"http:\/\/feeds.wordpress.com\/1.0\/gocomments\/a9810blog.wordpress.com\/308\/\"><img alt=\"\" border=\"0\" src=\"http:\/\/feeds.wordpress.com\/1.0\/comments\/a9810blog.wordpress.com\/308\/\" \/><\/a> <img alt=\"\" border=\"0\" src=\"https:\/\/pixel.wp.com\/b.gif?host=a9810blog.wordpress.com&#038;blog=115241006&%23038;post=308&%23038;subd=a9810blog&%23038;ref=&%23038;feed=1\" width=\"1\" height=\"1\" \/>","protected":false},"excerpt":{"rendered":"<p>&#8211;Originally published at Newbie Programmer Me when i see a loop Welcome to another post, and another loop. In this case we explain the FOR loop. The for loop is used for the same things as the While Loop, but the for loop is for finite loops. You can use Lists. If you put, for &hellip; <a href=\"https:\/\/kenscourses.com\/tc101fall2016\/syndicated\/more-loops-loops-everywhere-for-loop\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">More loops, loops everywhere, FOR LOOP.<\/span><\/a><\/p>\n","protected":false},"author":9,"featured_media":310,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[76,175,171,56,24,107,30],"class_list":["post-37688","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","category-syndicated","tag-1000awesome","tag-for","tag-loop","tag-newbie","tag-python","tag-tacos","tag-windows"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37688","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\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/comments?post=37688"}],"version-history":[{"count":2,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37688\/revisions"}],"predecessor-version":[{"id":38324,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/posts\/37688\/revisions\/38324"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/media?parent=37688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/categories?post=37688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2016\/wp-json\/wp\/v2\/tags?post=37688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}