Advertisement
here2share

# b_getch_yn.py

Mar 16th, 2019
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. # b_getch_yn.py
  2.  
  3. import random
  4. import msvcrt
  5.  
  6. d = ''
  7.  
  8. while d != 'n' and d!= 'N':
  9.     c = random.randint(1000,9999)
  10.     print c
  11.     print('Generate Another Random Number? (y/n): ')
  12.     d = msvcrt.getch()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement