HELP! IGCSE Computer Science Pre-Release (Feb/March) 2019Watch
I have my boards in 3-ish weeks and I still haven't started working properly on my pre-release program to convert to pseudocode. I feel like my method is too inefficient and I don't think it's supposed to be like that. Also, I think I used "Go to" in my test pseudocode but my teacher said that it's not allowed.
Is it possible for anyone to explain what I'm supposed to do? Any ideas? It'll be of great help if you could show me a sample of your pseudocode but an explanation should suffice.
Oh and btw it's something about Pizza and Additional toppings and stuff.
It's worth finding out from your teacher or exam board what they're expecting you to use in your answers and whether the pseudocode standard is merely for the exam board themselves to use for writing questions on the exam paper. I would think that the exam board aren't going to care whether you use your own pseudocode style or if you use a real programming language like Python instead.
In terms of representing a real program using pseudocode, it should be almost a direct like-for-like translation - for example, variables, if/else, for/while are all the same in pseudocode as they are in a real language. If you're finding it hard/slow to translate real code into pseudocode then you're definitely over-thinking it and over-complicating it because the whole point of pseudocode is that the exact syntax shouldn't matter as long as the intent and logic is clear.
Your teacher is right not to allow 'goto' in any case -- if you're writing programs with 'goto' then that is an indication that you still need more practice at writing structured logic.
'goto' is a symptom of having a very low-level way of thinking - the problem with 'goto' is that it can easily result in very hard-to-understand, unstructured "spaghetti" logic, where the flow of the program is difficult for someone reading to visualise - a lot of modern programming languages don't allow the concept of 'goto' for this reason.
Instead of focusing on pseudocode, use the real programming language to practice your computational thinking skills and solving algorithm problems - particularly if you're using Python because that disallows 'goto' altogether so it prevents you from falling back on to your 'goto' habit when writing code.