ProjectTitan313

Random Dex Number

Feb 8th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.54 KB | None | 0 0
  1. # Random Pokémon number, spits out a random National Dex number.
  2. # Written by ProjectTitan313. Febuary 8, 2013.
  3.  
  4. import random
  5.  
  6. Continue = 'yes'
  7. DexNumber = 0
  8. TryAgain = 'no'
  9.  
  10. while Continue == 'yes':
  11.     DexNumber = random.randint(1, 649)
  12.     print ("Enter anything to generate a new number. Enter Q to exit program")
  13.     TryAgain = input().lower()
  14.     TryAgain = str(TryAgain)
  15.  
  16.     if TryAgain != 'q':
  17.         Continue = 'yes'
  18.         print (int(DexNumber))
  19.  
  20.     elif TryAgain == 'q':
  21.         Continue = 'no'
  22.         break
Advertisement
Add Comment
Please, Sign In to add comment