Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
706 B
1
Indexable
Never
from random import shuffle
question_dict = {}

with open('Книга1.csv', 'r') as file:
    first = True
    for elem in file:
        if first:
            first = False
            continue

        elem = elem.replace("\n", "").split(";")
        question_dict[elem[0]] = elem[1:]
        shuffle(question_dict[elem[0]])

for key in question_dict:
    print(key)
    print(question_dict[key])

comments = {2: "Тебе ещё многому предстоит научиться!",
            3: "Ты что-то знаешь!",
            4: "Хорошо!",
            5: "Отлично!"}

mark = int(input("Какая у тебя оценка?"))
print(comments[mark])
Leave a Comment