It 269 Project Team Survey
It 269 Project Team Survey
Running = True
def Encourageing_message():
# Function to display an encouraging message based on the total score
if totScore == int(3):
print("Your score is " + str(totScore) + ". Amazing, you are so smart\
n")
elif totScore == int(2):
print("Your score is " + str(totScore) + ". Good job\n")
elif totScore == int(1):
print("Your score is " + str(totScore) + ". Nice try\n")
elif totScore == int(0):
print("Your score is " + str(totScore) + ". Maybe next time\n")
Ques0 = []
Ans0 = []
Rule0 = []
TotalScore = []
totalScore = []
print(rules)
ques1 = random.choice(Ques1)
index1 = Ques1.index(ques1)
rules1 = str(Rule1[index1])
print(str(rules1) + "\n")
ans1 = str(input(ques1 + " "))
answer1 = str(Ans1[index1])
if ans1 == answer1:
print("\nCorrect\n\n")
score1 = score1 + 1
else:
print("\nIncorrect")
score1 = score1 + 0
correctAns = input("\nDo you want to see the correct answer (y/n): ")
while True:
if correctAns == "n" or correctAns == "N":
print("\nNext Question.\n")
print("\n")
break
elif correctAns == "y" or correctAns == "Y":
print("\nCorrect is " + str(answer1) + ".\n")
print("\n")
break
else:
correctAns = input("\nDo you want to see the correct answer
(y/n): ")
Ques1.pop(index1)
Ans1.pop(index1)
Rule1.pop(index1)
Ques2 = Ques1
Ans2 = Ans1
Rule2 = Rule1
ques2 = random.choice(Ques2)
index2 = Ques2.index(ques2)
rules2 = str(Rule2[index2])
print(str(rules2) + "\n")
ans2 = str(input(ques2 + " "))
answer2 = str(Ans2[index2])
if ans2 == answer2:
print("\nCorrect\n")
score2 = score2 + 1
else:
print("\nIncorrect")
score2 = score2 + 0
correctAns = input("\nDo you want to see the correct answer (y/n): ")
while True:
if correctAns == "n" or correctAns == "N":
print("\nNext Question.\n")
break
elif correctAns == "y" or correctAns == "Y":
print("\nCorrect is " + str(answer2) + ".\n")
break
else:
correctAns = input("\nDo you want to see the correct answer
(y/n): ")
Ques2.pop(index2)
Ans2.pop(index2)
Rule2.pop(index2)
Ques3 = Ques2
Ans3 = Ans2
Rule3 = Rule2
ques3 = random.choice(Ques3)
index3 = Ques3.index(ques3)
rules3 = str(Rule3[index3])
print(str(rules1) + "\n")
ans3 = str(input(ques3 + " "))
answer3 = str(Ans3[index3])
if ans3 == answer3:
print("\nCorrect\n")
score3 = score3 + 1
else:
print("\nIncorrect")
score3 = score3 + 0
correctAns = input("\nDo you want to see the correct answer (y/n): ")
while True:
if correctAns == "n" or correctAns == "N":
print("\nNext Question.\n")
break
elif correctAns == "y" or correctAns == "Y":
print("\nCorrect is " + str(answer3) + ".\n")
break
else:
correctAns = input("\nDo you want to see the correct answer
(y/n): ")
Encourageing_message()
TotalScore.append(totScore)
totScore = 3
totalScore.append(totScore)