Advertisement
Guest User

lotto

a guest
Jan 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. import random
  2.  
  3. lotto_num_high = 10
  4. lotto_strongnum_high = 3
  5.  
  6. lotto = False
  7.  
  8. print('Hello, and welcome to our lottery\nFollow the instructions to complete your registerion\nYou can\'t change your numbers once choosen')
  9. print('')
  10.  
  11. while lotto != True:
  12. print('Choose your |FIRST| number between 1 to', lotto_num_high)
  13. lotto_num_first = int(input(''))
  14. if lotto_num_first > lotto_num_high or lotto_num_first < 1:
  15. print('INVALID NUMBER - YOU MUST CHOOSE NUMBER BETWEEN 1 TO', lotto_num_high)
  16. else:
  17. lotto = True
  18.  
  19. while lotto != False:
  20. print('Choose your |SECOND| number between 1 to', lotto_num_high)
  21. lotto_num_second = int(input(''))
  22. if lotto_num_second > lotto_num_high or lotto_num_second < 1:
  23. print('INVALID NUMBER - YOU MUST CHOOSE NUMBER BETWEEN 1 TO', lotto_num_high)
  24. else:
  25. lotto = False
  26.  
  27. while lotto != True:
  28. print('Choose your |THIRD| number between 1 to', lotto_num_high)
  29. lotto_num_third = int(input(''))
  30. if lotto_num_third > lotto_num_high or lotto_num_third < 1:
  31. print('INVALID NUMBER - YOU MUST CHOOSE NUMBER BETWEEN 1 TO', lotto_num_high)
  32. else:
  33. lotto = True
  34.  
  35. while lotto != False:
  36. print('Choose your |STRONG| number between 1 to', lotto_strongnum_high)
  37. lotto_num_strong = int(input(''))
  38. if lotto_num_strong > lotto_strongnum_high or lotto_num_strong < 1:
  39. print('INVALID NUMBER - YOU MUST CHOOSE NUMBER BETWEEN 1 TO', lotto_strongnum_high)
  40. else:
  41. lotto = False
  42.  
  43. print('')
  44. print('')
  45. print('YOUR NUMBERS ARE:', lotto_num_first, lotto_num_second, lotto_num_third, '\nYOUR STRONG NUMBER IS:', lotto_num_strong)
  46. print('')
  47. print('')
  48.  
  49. lotto_num_first_win = random.randint(1, lotto_num_high)
  50. lotto_num_second_win = random.randint(1, lotto_num_high)
  51. lotto_num_third_win = random.randint(1, lotto_num_high)
  52. lotto_num_strong_win = random.randint(1, lotto_strongnum_high)
  53. print('THE WINNING NUMBERS ARE:', lotto_num_first_win, lotto_num_second_win, lotto_num_third_win, '\nTHE WINNING STRONG NUMBER IS:', lotto_num_strong_win)
  54. print('')
  55. print('')
  56.  
  57. if lotto_num_first == lotto_num_first_win and lotto_num_second == lotto_num_second_win and lotto_num_third == lotto_num_third_win and lotto_num_strong == lotto_num_strong_win:
  58. print('YOU WON THE LOTTERY!')
  59. else:
  60. print('YOU ARE A LOSER!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement