The Student Room Group

OCR Computing Pseudo Code

If I write more towards Python coding than pseudo code(never understood how to do this), will I be penalized and lose marks? I'm planning to do flowcharts just because I can only write Python and not pseudo code. Thanks :smile:
Hi,

not sure if this helps, but I think if you write in a Python style, it should be fine. Just make sure that you stick in some extra words/use more general phrases in the structure so that it isn't just code itself (if that makes sense).

For example:

Python code ->

a = 0
while a < 10:
a = a + 1
print a

Pseudo code ->

'a' now equals 0
As long as 'a' is less than 10, do the following:
Make 'a' one larger than what it already is.
Print on-screen what 'a' is now worth.

I'd say that even that pseudo code is a bit wordy, I myself would write ->

a = 0
while a is less than 10
increment a by 1
print a

As you can see, my pseudo code is near identical to the actual code, but because I've generalised the 'while a < 10:' line and the incremental line, it can be classed as pseudo code, as it is explaining what is happening in a more general language (English) rather than being written in such a way that it satisfies Python syntax.

I'm not sure if you're doing the A-level or the GCSE, but on the A-level mark scheme for these questions, they mark for specific lines present, for example, my pseudo code could get 1 mark for initialising a, 1 mark for using a while loop and 1 mark for the incrementing. As long as I had these lines present and they were clearly pseudo code (no matter how close to actual code they look), I would get the marks.

(TSR doesn't like indenting for some reason, so forgive any lack of white space!)
(edited 7 years ago)

Quick Reply

Latest

Trending

Trending