Hi. I'm doing the OCR Computing A453 Programming Project and I have to write a pseudocode of how my code works.
This is the question.
A primary school teacher wants a computer program to test the basic arithmetic skills of her students. The program should generate a quiz consisting of a series of random questions, using in each case any two numbers and addition, subtraction and multiplication. The system should ask the student’s name, then ask 10 questions, output if the answer to each question is correct or not and produce a final score out of 10.
Analyse the requirements in detail and design, code, test and evaluate a program to meet these requirements
This is my code:
correct = 0
name = input("Please state your name: ")
for count in range(10):
num1 = random.randint(1, 10)
num2 = random.randint(1, 10)
symbol = random.choice(["+", "-", "*"])
print("Please solve:\n", num1, symbol, num2)
user = int(input(""))
if symbol == "+":
answer = num1 + num2
elif symbol == "-":
answer = num1 - num2
elif symbol == "*":
answer = num1 * num2
if user == answer:
correct = correct + 1
print(name, ", You Got", correct, "Out Of 10")
Please help us we have a shtty computing teacher who hasnt taught us crap and I'm having to learn things all by myself. Can someone help me write this up in PSEUDOCODE THANKS
|Four hours left to win £100 of Amazon vouchers!! Don't miss out! Take our short survey to enter||24-10-2016|