90% of our coding now on is going to be be "for loop" coding.
Check out my little code:
# Exercise 2 : Control Flow and Looping
"""
Loop through list a and only print out the even numbers.
"""
a = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
for realnumbers in a:
if realnumbers % 2 ==0:
print realnumbers
No comments:
Post a Comment