I can’t figure out how to check if the answer is right.
import random
elements = {"Co":"cobaltum",
"C":"Carboneum"}
question = random.choice(list(elements.keys()))
print(question)
answer=input("What is the full name of this element? ")
>Solution :
Perhaps:
if answer == elements:
print("you're right!")
…I think that’s what you’re asking. Basically you can access the value of a key in a dictionary like
myDict[key] # value