SHARE
TWEET

Untitled

a guest Oct 10th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def print_friends_count(friends_count, name=''):  # добавьте новый аргумент
  2.     if friends_count == 1:
  3.         text = '1 друг'
  4.     elif 2 <= friends_count <= 4:
  5.         text = str(friends_count) + ' друга'
  6.     elif friends_count >= 5:
  7.         text = str(friends_count) + ' друзей'
  8.     if name == '':
  9.         print('У тебя ' + str(friends_count) + ' друзей')
  10.     else:
  11.         print(name + ', у тебя ' + text)
  12.  
  13. # дальше код не меняйте
  14. print_friends_count(3, 'Артём')
  15. print_friends_count(friends_count=7, name='Марина')
  16. print_friends_count(6)
  17. print_friends_count(4, name='Настя')
  18. print_friends_count(9)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top