Advertisement
Brat1990

Untitled

Nov 1st, 2020
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import random
  2. #ch = random.randint(1,5)
  3. running = True
  4.  
  5. while running:
  6.     ch = random.randint(1,5)
  7.     n = int(input('введи целое число:'))
  8.     if n == ch:
  9.             print('Верно! И вы выиграли автомобиль!')
  10.             print('Еще разок? Да / Нет')
  11.             c = input()
  12.             if c == 'Да':
  13.                 continue
  14.             if c == 'Нет':
  15.                 running = False
  16.             else:
  17.                 print('Да или Нет')
  18.     elif n > ch:
  19.             print('Не верно. Меньше надо')
  20.     else:
  21.             print('Не правильно. Больше надо')
  22. else:
  23.     print('Выход')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement