hi this is my quiz. what i need to do is add a thing at the start where it askes the user their age. if the user is under the age of 5 they will only be asked 5 question and if there 5 or above they will be asked 10 questions. PLEASE HELP
#rhys translation quiz
#the list of questions that will be asked
question_list = [
( "What is Kia ora in english",
"a. Hello\nb. Bye\nc. Greetings\nd. See ya\n",
"a"),
( "What is t?n? rawa atu koe in english",
"a. Give it\nb. bye\nc. Thank you\nd. See ya\n",
"c"),
( "What is rorohiko in english",
"a. TV\nb. Microwave\nc. Oven\nd. Computer\n",
"d"),
( "What is motuk? in english",
"a. Van\nb. Car\nc. Truck\nd. bus\n",
"c"),
( "What is whare kotahi in english",
"a. Deck\nb. Game\nc. Suit\nd. Card\n",
"d"),
( "What is haupa in english",
"a. Food\nb. Drink\nc. Soup\nd. Water\n",
"a"),
( "What is Ng? Aho Whakaari in english",
"a. Show\nb. Film\nc. Song\nd. Book\n",
"b"),
( "What is makawe in english",
"a. Face\nb. Hair\nc. Neck\nd. Beard\n",
"b"),
( "What is tau in english",
"a. Letter\nb. Number\nc. Space\nd. Shape\n",
"b"),
( "What is wini in english",
"a. Win\nb. Lose\nc. Try again\nd. Quit\n",
"a"),
]
play_again = True
while play_again:
score = 0
#intro and inrtuctions
print ("""Welcome to the translation quiz
You will be ask a series of questions and have 2 tries per questions
If you get the correct answer you will get one point, half a point for getting it
your second try and zero points if you get it wrong twice.
GOOD LUCK!!!
""")
for question, options, correct in question_list:
print(question)
print(options)
#user will have to enter a,b,c or d for there answer
response = input("Hit 'a', 'b', 'c' or 'd' for your answer\n")
#simple, if answer is correct print correct and move on to next question, if not try again
if response.lower() == correct:
print ("Correct\n")
score = score + 1
#this will say there wrong and they will get another try. if they get it right they get 0.5 points and if not they move on to the next question
else:
print("Wrong. Try again.\n")
response = input("Hit 'a', 'b', 'c' or 'd' for your answer\n")
if response.lower() == correct:
print ("Correct\n")
score = score + 0.5
else:
print("Wrong. You ran out of attempts\n")
#this will print the users final score out of 10
print ("Your score was", str (score)+"/10")
#this is a restart. if the user says y then they restart if not the program ends.
response = input("Do you want to play again (y/n)?").strip().lower()
if response not in ('', 'y', 'yes'):
play_again = False