Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- condition = (1, 16) # This is just a tupple. I think you're tyring to print a range
- while condition != 0: # This logic would be nonsensical to the computer as you're basically saying as long as condition
- # does not equal zero, then keep printing
- print(condition)
- for i in range(1, 16): # This is what I think you're trying to achieve
- print(i) # This prints every number from 1 to 16, but will end up with an output at 15
- # Below is an alternative way
- number = 1 # We initialize number as 1 because that's where we want to start
- while number != 16: # We set the condition that, while number doesn't equal 16, then keep printing
- print(number)
- number += 1 # We add one to number to keep moving the number up one
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement