I am having a problem in my python code. I am a beginner so this in a really simple ask. So I only have some months experience(4 months). I am making a project in which there are QnA(s) I am having problem with 2 things. First: I am not able to call these functions:
def questions()
def question2()
Second problem: I want to make options for the questions for E.G:
def question():
Q1 = input("Who is the lord of a random place")
if Q1 == ["Lofi", "Loafer", "Lofe"]:
print('Correct answer!!')
else:
print('Wrong answer!! The correct answer is LOFI!!')
I am not sure what operator or keyword to use to do this. Please help, Here is the Code:
def question():
Q1 = input("Who is the lord of a random place")
if Q1 == ["Lofi", "Loafer", "Lofe"]:
print('Correct anwer!!')
else:
print('Wrong answer!! The correct answer is LOFI!!')
question()
def question2():
Q2 = input("Who is the most trustful person in the world?")
if Q2 == ["Lofi", "Annu", "scoob"]:
print("Correct answer!! U WIN!!!!")
else:
print("WRONG ANSWER!!")
question2()