Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter

    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:
    import random

    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

    First of all you can pretty much present what you have as pseudo code.
    However, (1) Indent blocks of code. (2) You could change method calls such as random.choice(["+", "-", "*"]) to functions like this

    a) Change random.choice(["+", "-", "*"]) to symbol = get__random_operator()
    b) Add a function like
    function get__random_operator()
    case i of random_integer
    1: return "+"
    2: return "-"


    This means that you pseudo code does not contain anything too language specific

    I assume you code is indented and TSR removed the indenting as it has for me!

    what the ****
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Would you like to hibernate through the winter months?
    Useful resources

    Study tools


    Essay expert

    Learn to write like a pro with our ultimate essay guide.

    Thinking about uni already?

    Thinking about uni already?

    See where you can apply with our uni match tool

    Student chat

    Ask a question

    Chat to other GCSE students and get your study questions answered.


    Make study resources

    Create all the resources you need to get the grades.


    Create your own Study Plan

    Organise all your homework and exams so you never miss another deadline.

    Resources by subject

    From flashcards to mind maps; there's everything you need for all of your GCSE subjects.


    Find past papers

    100s of GCSE past papers for all your subjects at your fingertips.

    Help out other students

    Can you help? Study help unanswered threads

    Groups associated with this forum:

    View associated groups
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.