i'm looking for help on making a numeracy test in python I've had a go at it and cant seem to get it • When the programme first loads the user is asked to enter their name
• Once they have entered their name they are greeted by their name and given the following menu options:
• a - Addition - complete 10 addition questions, print score at the end
• s - Subtraction - complete 10 subtraction questions, print score at the end
• m - Multiplication - complete 10 multiplication questions (when you enter the multiplication section you must ask the user which timetable they wish to practice from 1-15), print score at the end
• d - Division - complete 10 random division questions, print score at the end
• r - Results - prints to the screen a summary of the current existing results for any of the above quizzes
• q - Quit - Quits the programme
_This is what I've tried to do so far
name = input("Hello user whats your name?.")
print ("welcome " + name + " to the numeracy test v1.1.09.")
def function(menu):
while True:
s = input("if you want to do Subtraction press 's'.(Then press 'enter') ")
m = input("if you want to do Multiplication press 'm'.(Then press 'enter') ")
d = input("if you want to do Division press 'd'.(Then press 'enter') ")
r = input("if you want to recieve your results press 'r'.(Then press 'enter') ")
q = input("if you want to quit numeracy test v1.1.09 press 'q'.(Then press 'enter') ")
a = Addition
s = Subtraction
m = Multiplicaion
d = Division
r = Results
q = Quit
selection = raw_input("Please Select:")
if selection == a:
print("Addition had been chosen.")
elif selection == s:
print("Subtraction has been chosen.")
elif selection == m:
print("Multiplication has been chosen.")
elif selection == d:
print("Division has been chosen.")
elif selection == r:
print("you have chosen to recieve your results.")
elif selection == q:
print("you have chosen to Quit numeracy test v1.1.09.")
else:
print("Unknown Option Selected, please try again !.")
while True:
break
Aucun commentaire:
Enregistrer un commentaire