import random
import time
#список
list = ["4+4", "3*4", "3+7", "9-7"]
#вывод рандомного слова
vivod = random.choice(list)
print(vivod)
#ввод юзером ответ примера и проверка
user = input()
if vivod == user:
print("Верно")
else:
print("Ошибка")
questions = {'4+4': 8, '3*4': 12, '3+7': 10, '9-7': 2}
question, answer = random.choice(list(questions.items()))
user = int(input())
if answer == user:
# ...
from ast import literal_eval
if literal_eval(vivod) == user:
riddles = {
'1+1': 2,
'2+2': 4,
}