Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # counting using a for loop & range(xx, yy)
- # Notice what numbers are printed (1 to 10).
- for number in range(1,11):
- print(number)
- #A good example of Counting using a while loop:
- # Notice the numbers printed(0 to 9).
- count = 0
- while count < 10:
- print("Count is: ", count)
- count = count + 1
Advertisement
Add Comment
Please, Sign In to add comment