Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Set variables equal to a value.
- x = 3
- y = 5
- n = 1
- while x * n < 1000: # when the answer is less than 1000, do the rest
- print x * n # print the answer
- n + 1 # then increment the multiplier by one
- if x * n >= 1000:
- break # STOP!
- else:
- n + 1 # increment, maybe I don't need this
- # same as above but with 5 now
- while y * n < 1000:
- print y * n
- n + 1
- if y * m >= 1000:
- break
- else:
- n + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement