There are 3 types of repetition:
-For loop
-While loop
-Recursion<\/p>\n
The FOR loop is used when you know the number of repetitions. It can be used with ranges, list tuples or dictionaries(iterable objects). It takes a value inside the object, work with it, and then do the same thing with the next value until the iterable object is finished.<\/p>\n
The WHILE loop is used when you dont how the number of repetitons. It works with a condition and it will repeat until the condition is false.<\/p>\n
Recursion is when you call a function inside the same function. It can be used in special cases where you need to take a value from the function itself, this job can be done with FOR or WHILE loops but it\u00b4s shorter to write a recursion. <\/p>\n","protected":false},"excerpt":{"rendered":"
There are 3 types of repetition:
-For loop
-While loop
-Recursion<\/p>\n
The FOR loop is used when you know the number of repetitions. It can be used with ranges, list tuples or dictionaries(iterable objects). It takes a value inside the object, work with it, and then do the same thing with the next value until the iterable object is finished.<\/p>\n
The WHILE loop is used when you dont how the number of repetitons. It works with a condition and it will repeat until the condition is false.<\/p>\n
Recursion is when you call a function inside the same function. It can be used in special cases where you need to take a value from the function itself, this job can be done with FOR or WHILE loops but it´s shorter to write a recursion.<\/p>\n","protected":false},"author":198,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[336,866],"class_list":["post-27046","post","type-post","status-publish","format-standard","hentry","category-blogs","category-syndicated","tag-mastery22","tag-repetition"],"_links":{"self":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/27046","targetHints":{"allow":["GET"]}}],"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\/198"}],"replies":[{"embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/comments?post=27046"}],"version-history":[{"count":1,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/27046\/revisions"}],"predecessor-version":[{"id":27047,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/posts\/27046\/revisions\/27047"}],"wp:attachment":[{"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/media?parent=27046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/categories?post=27046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kenscourses.com\/tc101fall2015\/wp-json\/wp\/v2\/tags?post=27046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}