Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- cube = random.randint(1, 6)
- summa = 0
- print('Напиши "go" для того щоб кинути кубик. \n')
- i = input()
- if i == 'go':
- while True:
- cube = random.randint(1, 6)
- print('На кубику випало число ', cube)
- if cube != 1:
- summa += cube
- else:
- summa = 0
- print('Сумма равна ', summa)
- if summa >= 100:
- print('Сумма >= 100')
- break
- print('Для того щоб кинути ще раз напиши "+".')
- i = input()
- if i == '+':
- continue
- else:
- break
- else:
- print('ну і не треба')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement