Title: Layout 2
Course: CPS 120: Introduction to Computer Science ~ Master (Aug/2015) OLD > Section: Learning Units

✓ Layout 2 syntax – continually execute the first block for each value in the set, and then execute the second block.

for <index-variable> in <set>:
<first-block>
else:
<second-block>

✓ Layout 2 example:

for temp in range(71, 41):
print ("temp is now", temp)
else
print("We went from summer to fall!")