Guest User

Untitled

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