Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Question 6
- number = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
- count_odd = 0
- count_even = 0
- for number in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15):
- if number % 2 == 0:
- count_even += 1
- else:
- count_odd += 1
- print "%s even numbers" % count_even
- print "%s odd numbers" % count_odd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement