Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. def print_friends_count(friends_count, name=''): # добавьте новый аргумент
  2. if friends_count == 1:
  3. text = '1 друг'
  4. print('У тебя' + text)
  5. elif 2 <= friends_count <= 4:
  6. text = str(friends_count) + ' друга'
  7. print(name + ', у тебя ' + text)
  8. elif friends_count >= 5:
  9. text = str(friends_count) + ' друзей'
  10. print(name + ', у тебя ' + text)
  11.  
  12. # дальше код не меняйте
  13. print_friends_count(3, 'Артём')
  14. print_friends_count(friends_count=7, name='Марина')
  15. print_friends_count(6)
  16. print_friends_count(4, name='Настя')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement