Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- lotto_num_high = 10
- lotto_strongnum_high = 3
- lotto = False
- print('Hello, and welcome to our lottery\nFollow the instructions to complete your registerion\nYou can\'t change your numbers once choosen')
- print('')
- while lotto != True:
- print('Choose your |FIRST| number between 1 to', lotto_num_high)
- lotto_num_first = int(input(''))
- if lotto_num_first > lotto_num_high or lotto_num_first < 1:
- print('INVALID NUMBER - YOU MUST CHOOSE NUMBER BETWEEN 1 TO', lotto_num_high)
- else:
- lotto = True
- while lotto != False:
- print('Choose your |SECOND| number between 1 to', lotto_num_high)
- lotto_num_second = int(input(''))
- if lotto_num_second > lotto_num_high or lotto_num_second < 1:
- print('INVALID NUMBER - YOU MUST CHOOSE NUMBER BETWEEN 1 TO', lotto_num_high)
- else:
- lotto = False
- while lotto != True:
- print('Choose your |THIRD| number between 1 to', lotto_num_high)
- lotto_num_third = int(input(''))
- if lotto_num_third > lotto_num_high or lotto_num_third < 1:
- print('INVALID NUMBER - YOU MUST CHOOSE NUMBER BETWEEN 1 TO', lotto_num_high)
- else:
- lotto = True
- while lotto != False:
- print('Choose your |STRONG| number between 1 to', lotto_strongnum_high)
- lotto_num_strong = int(input(''))
- if lotto_num_strong > lotto_strongnum_high or lotto_num_strong < 1:
- print('INVALID NUMBER - YOU MUST CHOOSE NUMBER BETWEEN 1 TO', lotto_strongnum_high)
- else:
- lotto = False
- print('')
- print('')
- print('YOUR NUMBERS ARE:', lotto_num_first, lotto_num_second, lotto_num_third, '\nYOUR STRONG NUMBER IS:', lotto_num_strong)
- print('')
- print('')
- lotto_num_first_win = random.randint(1, lotto_num_high)
- lotto_num_second_win = random.randint(1, lotto_num_high)
- lotto_num_third_win = random.randint(1, lotto_num_high)
- lotto_num_strong_win = random.randint(1, lotto_strongnum_high)
- 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)
- print('')
- print('')
- 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:
- print('YOU WON THE LOTTERY!')
- else:
- print('YOU ARE A LOSER!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement