import random
CorrectResponces = ['Congrats', 'Good Job', 'You got it', "You're on fire"]
IncorrectResponces = ['Better luck next itme', 'Think a little harder',
'Wow are you stupid', 'How did you get this one wrong']
FinalResponces = ["You wouldn't even be able to get participation points", 'You are really really bad at this',
"You didn't do absolutely terrible but not good either", "Good enough job ig"]
def True_Or_False():
i = 1
CorrectVal = 0
WrongVal = 0
Start = input('Enter "START" to begin =>')
if Start == "START":
while i <= 3:
VGQuestions = random.randint(1, 3)
if VGQuestions == 1:
Answer = input(
'"The Legend of Zelda Breath of the Wild" Released in 2017 =>')
i = i + 1
if Answer == 'TRUE':
print(random.choice(CorrectResponces))
CorrectVal = CorrectVal + 1
elif Answer == 'FALSE':
print(random.choice(IncorrectResponces))
WrongVal = WrongVal + 1
else:
print('Please enter "TRUE" or "FALSE"')
if VGQuestions == 2:
Answer = input(
'"Super Smash Bros Ultimate" has over 100 playable characters =>')
i = i + 1
if Answer == 'FALSE':
print(random.choice(CorrectResponces))
CorrectVal = CorrectVal + 1
elif Answer == 'TRUE':
print(random.choice(IncorrectResponces))
WrongVal = WrongVal + 1
else:
print('Please enter "TRUE" or "FALSE"')
if VGQuestions == 3:
Answer = input(
'There are over 500 obtainable pokemon across all the games as of 2023 =>')
i = i + 1
if Answer == 'TRUE':
print(random.choice(CorrectResponces))
CorrectVal = CorrectVal + 1
elif Answer == 'FALSE':
print(random.choice(IncorrectResponces))
WrongVal = WrongVal + 1
if WrongVal == 3:
print(FinalResponces[0])
elif WrongVal == 2:
print(FinalResponces[1])
elif WrongVal == 1:
print(FinalResponces[2])
elif WrongVal == 0:
print(FinalResponces[3])
FinalScore = f'Correct {CorrectVal}; Wrong {WrongVal}'
print(FinalScore)
else:
print('Please type "START" to begin')
True_Or_False()
True_Or_False()
I would like the boolean to loop when 'TRUE' or 'FALSE' aren't inputed. I tired putting that portion of the code in a function then declaring the function after else but it wasnt working.