A Level Computer Science Summer Task - Flowcharts & PseudocodeWatch
This is the task: https://www.leggott.ac.uk/wp-content...rogramming.pdf
Help would be appreciated, thank you
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
Remember that computers are fundamentally only capable of 3 different kinds operations and nothing more:
- Executing instructions in sequential order. (where an instruction is anything which could be described using a verb -- i.e. "do something").
- Conditionally selecting (one or more) instructions to execute based on boolean (true/false) decision logic.
- Repeatedly executing (one or more) instructions -- typically also based on a boolean decision logic (i.e. repeating if a condition evaluates to true).
- 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.)