Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. n = int(input("Введите возраст Джона: "))
  2. if (n == 1) or (20 <= n <= 99 and n % 10 == 1):
  3.     print("Джону",n,"год")
  4. elif (2 <= n <= 4) or ((20 <= n <= 99) and (n % 10 == 2 or n % 10 == 3 or n % 10 == 4)):
  5.     print("Джону",n,"года")
  6. elif (5 <= n <= 20) or ((21 <= n <= 99) and (n % 10 == 0 or n % 10 == 5 or n % 10 == 6 or n % 10 == 7 or n % 10 == 8 or n % 10 == 9)):
  7.     print("Джону",n,"лет")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement