You are Here: Home >< GCSEs

# PseudoCode HELP???!!!?!?

Announcements Posted on
Four hours left to win £100 of Amazon vouchers!! Don't miss out! Take our short survey to enter 24-10-2016
1. 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
for count in range(10):
num1 = random.randint(1, 10)
num2 = random.randint(1, 10)
symbol = random.choice(["+", "-", "*"])
user = int(input(""))

if symbol == "+":
elif symbol == "-":
elif symbol == "*":

print("Correct!")
correct = correct + 1
else:
print("Incorrect")

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
2. 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()
function get__random_operator()
n=random_integer(4)
case i of random_integer
1: return "+"
2: return "-"

....
end;

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!

## Register

Thanks for posting! You just need to create an account in order to submit the post
1. this can't be left blank
2. this can't be left blank
3. this can't be left blank

6 characters or longer with both numbers and letters is safer

4. this can't be left empty
1. Oops, you need to agree to our Ts&Cs to register

Updated: April 27, 2016
TSR Support Team

We have a brilliant team of more than 60 Support Team members looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

This forum is supported by:
Today on TSR

### Who is getting a uni offer this half term?

Find out which unis are hot off the mark here

Poll
Useful resources

## Study tools

### Essay expert

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

See where you can apply with our uni match tool

### 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.