Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- while True:
- try:
- age = int(input("А сколько тебе лет?"))
- except ValueError:
- print ("Можно цифрами?")
- else:
- break
- if int(age) <= 10:
- print ("Тебе всего лишь", age)
- otvet = input ("Такой малой, а меня за общение с тобой не закроют?")
- otvet = otvet.lower().strip()
- if otvet == "да":
- print ("Круто, продолжим тогда общение?")
- else:
- sys.exit()
- elif 10 <= int(age) <= 45:
- print ("Ого!Тебе", age, "Мне нравится твой возраст!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement