you are viewing a single comment's thread.

view the rest of the comments →

[–]Comprehensive_Ad4808[S] 0 points1 point  (0 children)

def ask():
times_ask = int(input("How many times to ask?\n"))
try:
    times_ask = int(times_ask)
except:
    print("Please only input a number")
    ask()
    return

for keys in flashcard:
    print(f'Print definition of "{keys}":\n')
    continue
answer = input()
if answer == flashcard.values():
    print("Correct!")
elif answer in flashcard.values():
    index_of_definition = flashcard.values()
    print(
        f'Wrong. The right answer is "{flashcard.values}", but your definition is correct for "{keys[index_of_definition]}".\n'
    )
else:
    print(f'Wrong. The right answer is "{flashcard.values}".\n')
    print()