umarov99

Valeriy

Jun 28th, 2021
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. # Объявите функцию здесь
  2. # Весь код должен оказаться внутри функции
  3.  
  4. def print_friends_count(friends_count):
  5. for i in range(1, 11):
  6. print_friends_count(i)
  7. remainder = friends_count % 10
  8. if friends_count == 0:
  9. print('У тебя нет друзей')
  10. elif remainder == 0 or remainder >= 5 or (10 <= friends_count <= 19):
  11. print('У тебя', friends_count, 'друзей')
  12. elif remainder == 1:
  13. print('У тебя', friends_count, 'друг')
  14. else:
  15. print('У тебя', friends_count, 'друга')
  16. print_friends_count(5)
Advertisement
Add Comment
Please, Sign In to add comment