Guest User

Untitled

a guest
Dec 13th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. import random
  2.  
  3. name = raw_input("Welcome to Nick's novelty winning lottery number generator, What's your name? ")
  4. print ("Hello "+name+ ", By running this program you are agreeing to the following terms: The creator of this program accepts no responsibility or liability for any losses which may be incurred by any person or persons using this program. This program is intended for novelty use only. Use at your own risk.")
  5. terms = raw_input("Do you agree? Yes or No: ")
  6. if terms.lower() == "yes":
  7. z = int(raw_input("How many winning lottery numbers would you like? "))
  8. print ("Next, we will pick the number range...")
  9. x = int(raw_input("Please pick a starting number: "))
  10. y = int(raw_input("Please pick a ending number: "))
  11. numbers = random.sample(xrange(x, y), z)
  12. numbers.sort()
  13. print("Good luck, here are your winning lottery numbers:") #If you win, don't forget, sharing is caring...
  14. print numbers
  15. else:
  16. print("Sorry, if you do not agree, you are unable to play. Be Well!")
Add Comment
Please, Sign In to add comment