{"id":2773,"date":"2022-06-19T22:53:31","date_gmt":"2022-06-20T02:53:31","guid":{"rendered":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/?p=2773"},"modified":"2022-06-19T22:53:31","modified_gmt":"2022-06-20T02:53:31","slug":"the-three-parts-of-a-for-loop","status":"publish","type":"post","link":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/2022\/06\/19\/the-three-parts-of-a-for-loop\/","title":{"rendered":"The Three Parts of a For Loop"},"content":{"rendered":"<p>Here are the three parts of a for loop, and how to remember them:\u00a0<\/p>\n<p>Initial-Action: This is where you state what a certain value equals. For example i=0, we are stating that currently, i is equal to zero. This is easy to remember because it&#8217;s the initial value, it is current.\u00a0<\/p>\n<p>Loop-Continuation-Condition: This is part of a for loop that determines when the loop starts. For example, i &lt;10. As long as i is less than ten, the loop will carry on. When i becomes greater than or equal to ten, then the loop will stop. This one is easy to remember because it&#8217;s the condition, on what condition does the loop stop, and on what condition does the value make the statement false?\u00a0<\/p>\n<p>Action-After-Each -Iteration: This is the last part of a for loop. This part of a for loop tells you what to do with i after the loop is carried out one time. For example i=i+2. Each time the loop carries out, i will equal the current value plus two. This is easy to remember because it&#8217;s what happens after a loop, the ACTION that takes place once the loop is over.\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are the three parts of a for loop, and how to remember them:\u00a0 Initial-Action: This is where you state what a certain value equals. For example i=0, we are stating that currently, i is equal to zero. This is easy to remember because it&#8217;s the initial value, it is current.\u00a0 Loop-Continuation-Condition: This is part [&hellip;]<\/p>\n","protected":false},"author":28303,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[663943],"tags":[],"class_list":{"0":"post-2773","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-instructor","7":"entry"},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/posts\/2773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/users\/28303"}],"replies":[{"embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/comments?post=2773"}],"version-history":[{"count":1,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/posts\/2773\/revisions"}],"predecessor-version":[{"id":2778,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/posts\/2773\/revisions\/2778"}],"wp:attachment":[{"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/media?parent=2773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/categories?post=2773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/community.mis.temple.edu\/mis2101sec712summer2022\/wp-json\/wp\/v2\/tags?post=2773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}