The Student Room Group

ocr gcse computer science python programming

Hi guys, i was revising for tommoroow and I'm a bit confused on how to write my programming answers.
When it mentions write in a high level language, (i use python) does that mean that my answer will ONLY get full marks if my code can be transferred into that language and run to give the expected output??

or can a few inconsistencies work? for example, I am trying to loop until the end of an array uisng the len() function

i would have to do for i in in range(0, len()-1)
however this does not work in python, i have to first assign len() to a variable and then take away 1, so should I use the same procedure in my code??
Reply 1
If you look at mark schemes they award you for the stuff you put e.g. one mark for finding the length, one mark for the "in range" loop (so using a counter controlled, not a conditional loop), obviously you're writing it on paper so I don't think it matters if it works or not in real life as long as you've understood the concept of what you're supposed to do, but obviously, if it does work then that's good
Reply 2
Original post by Liqht
If you look at mark schemes they award you for the stuff you put e.g. one mark for finding the length, one mark for the "in range" loop (so using a counter controlled, not a conditional loop), obviously you're writing it on paper so I don't think it matters if it works or not in real life as long as you've understood the concept of what you're supposed to do, but obviously, if it does work then that's good

thank you!!
Reply 3
Original post by aanaya
thank you!!

np :smile:
good luck for tomorrow!
Reply 4
Original post by Liqht
np :smile:
good luck for tomorrow!

you too!

Quick Reply