counter = 0
question = [{'question': 'Сколько лет в году?',
'answers':['1','2','12'],
'ranswer' : 1},
{'question': 'Когда открылась программа поле чудес?',
'answers':['1999','1890','2001','1990'],
'ranswer' : 4}]
for question in question:
print(question.get('question'))
answer_number = 0
for answers in question['answers']:
answer_number += 1
print(f'{answer_number}. {answers}')
user_answer = int(input('Введите ответ: '))
if user_answer == question['ranswer']:
print('Правильно! ')
counter += 1
else:
print('Неправильно ')
counter += 0
print('Ваш счет: ' + str(counter))