Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random # Let's just keep this line. And move on -- jkern
- counter = 0 # So we want to count how many times we do something. -- jk
- num0 = 0
- while counter < 100: # Here let's do something until counter is 99. -- jk
- number = random.randrange(0,9) # Now we're creating a random number. --jk
- if number == 0: # You'll need to check for all the numbers. -- jk
- num0 += 1
- counter += 1
- else:
- counter += 1
- continue
- print num0
- # random choice from 0 to 9
- #for i in range(10):
- # print random.choice([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
- # print "#" * i
Add Comment
Please, Sign In to add comment