Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interview = {}
- active = True
- while active:
- name = input('Как вас зовут?\n')
- question = input('Какая марка автомобиля вам нравится?\n')
- answers = []
- answers.append(question)
- interview[name] = answers
- active_2 = True
- while active_2:
- repeat = input('Желаете добавить еще один автомобиль? (yes/no)\n')
- if repeat == 'no':
- active_2 = False
- else:
- question_n = input('Какая марка автомобиля вам еще нравится?\n')
- answers.append(question_n)
- repeat = input('Желаете продолжить опрос? (yes/no)\n')
- if repeat == 'no':
- active = False
- print('Опрос завершен, все результаты: ')
- for name, questions in interview.items():
- print(f'{name.title()} любит автомобили марки: ')
- for question in questions:
- print(f'{question.title()}')
Add Comment
Please, Sign In to add comment