Jump to navigation Jump to search
##To iterate over a list - Will run the code block once for each element in a list. You can reference the element data during each iteration by putting an element name after "for". Example of this syntax can be seen below: '''for''' element '''in''' list''':''' '''''*code to repeat*''''' <br />
##To iterate a certain number of times - Use Python's range function to repeat the code block a certain number of times. The syntax for range is: range (start, stop[, step]). Just like in the other type of for loop, you can reference each element of the range function but naming it. The syntax for this for loop goes: '''for ('''element '''in range('''start, stop[, step]''')):''' '''''*code to repeat*''''' <br />
#Nested Loops - Loops can be nested inside of each other!
==Other Educational Resources for Python==
*Basic Understanding of Methods
*Basic Understanding of If Statements (or, and, else, elif)
*Basic Understanding of Loops (for loop, while loop)
*Make a Magic Conch Shell Demo!