Advertisement
Allena_Gorskaya

Programma 3

Feb 5th, 2019
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. from random import*
  2. print('Я загадал число от 1 до 20. Попробуй угадать!')
  3. secret = randint(1, 20)
  4. ans = int(input())
  5. while ans != secret:
  6.     if ans > secret:
  7.         print('Слишком большое число!')
  8.     else:
  9.         print('Маловато...')
  10.     ans = int(input('Попробуй еще раз!\n'))
  11. print('Молодец, угадал!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement