Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FRIENDS = ['Серёга', 'Соня', 'Дима', 'Алина', 'Егор']
- def print_friends_count(friends_count):
- if friends_count == 1:
- print('У тебя 1 друг')
- elif 2 <= friends_count <= 4:
- print('У тебя ' + str(friends_count) + ' друга')
- elif friends_count >= 5:
- print('У тебя ' + str(friends_count) + ' друзей')
- def process_query(query):
- if query == 'Сколько у меня друзей?':
- print_friends_count()
- else:
- print('<неизвестный запрос>')
- print("Привет, я Анфиса!")
- count = len(FRIENDS)
- print_friends_count(count)
- process_query('Сколько у тебя друзей?')
- process_query('Как меня зовут?')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement