A Level Computer Science Summer Task - Flowcharts & Pseudocode

Watch
njh31
Badges: 3
Rep:
?
#1
Report Thread starter 1 year ago
#1
So for my summer task before starting Year 12, I have been given a task where I have to convert a flowchart into pseudocode.

This is the task: https://www.leggott.ac.uk/wp-content...rogramming.pdf

Help would be appreciated, thank you
Last edited by njh31; 1 year ago
0
reply
ParadoxSocks
Badges: 22
Rep:
?
#2
Report 1 year ago
#2
First of all, I'd find a version of pseudocode that works for you. There's usually official guides for each exam board but if that doesn't work for you, and since it's not officially mentioned, you can make it up as long as you're consistent.

Next just focus on each box. What's happening in each, what logic is being used, what variables need setting up? For choices you're looking at if statements and loops to repeat sections until an appropriate input is created.

For each patient vital sign/condition, you'll need a method of storing and updating. That could be a really good place to start.

Pseudocode is one of the those things that seems much harder than it is. Happy to help if you need any more guidance
1
reply
winterscoming
Badges: 19
Rep:
?
#3
Report 1 year ago
#3
Well, it looks like it's asking you to write pseudocode (i.e. a "plain English" way of using programming language 'constructs' -- terms which a computer can understand an act on in order to create a "program").

Remember that computers are fundamentally only capable of 3 different kinds operations and nothing more:
  1. Executing instructions in sequential order. (where an instruction is anything which could be described using a verb -- i.e. "do something").
  2. Conditionally selecting (one or more) instructions to execute based on boolean (true/false) decision logic.
  3. Repeatedly executing (one or more) instructions -- typically also based on a boolean decision logic (i.e. repeating if a condition evaluates to true).
(Or the short version: Sequence, Selection and Repetition).

Firstly:
  • Are you comfortable with the syntax/structure of any real programming language or pseudocode?
  • Are you comfortable with boolean logic?
  • Are you familiar with the programming language construct(s) used for conditional branching with boolean decision logic? (i.e. "IF")
  • Do you know which flowchart symbol is used for conditional branching with boolean decision logic? (you can probably guess just by reading it)
  • Can you see how the concept of boolean logic can be applied to yes/no questions?
  • Are you familiar with the (pseudo)code / programming constructs which can allow a program to repeat the same instruction(s) more than once?

Familiarity with these concepts should get you there. If you're not familiar with them, it might help to follow a few introductory programming lessons with a real programming language like Python so that you can get a bit of experience writing code and seeing how real code works.

These interactive lessons are very beginner-friendly, and python is very human-readable/natural, and reasonably close to psuedocode: https://www.codecademy.com/learn/learn-python
(Pseudocode is supposed to look very, very similar to a real programming language, just with a "less fussy/nitpicky" syntax but the concepts/structure/flow should be identical!)

Doing a task like this seems like a good way to get your head into the mindset of thinking in terms of the most fundamental 'building blocks' that you'll find in any programming language (sequence/selection/repetition). If yóú can get your head around that, the correlation between what you'd do in a real programming language compared with the flowchart ought to jump out at you.

If you are familiar with the programming concepts of conditional logic and repetition:
  • Look at your flowchart and match (non-repeated) Conditional logic up with the appropriate (pseudo)code and boolean expression
  • Look at your flowchart for anything which suggests repetition (i.e. doing the same action/instruction more than once) and match that with the appropriate (pseudo)code.

The flowchart you're looking at should map fairly neatly onto a programming language or pseudocode (that's generally the point of a flowchart -- to represent some kind of process using a series of logical steps; which is much the same thing that a computer program will do.)
Last edited by winterscoming; 1 year ago
1
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

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.

Personalise

Should there be a new university admissions system that ditches predicted grades?

No, I think predicted grades should still be used to make offers (606)
33.87%
Yes, I like the idea of applying to uni after I received my grades (PQA) (749)
41.87%
Yes, I like the idea of receiving offers only after I receive my grades (PQO) (354)
19.79%
I think there is a better option than the ones suggested (let us know in the thread!) (80)
4.47%

Watched Threads

View All