flow charts and pseudo code
TRANSCRIPT
BBBIT
BBBIT
By the end of today’s lesson;• All of you will understand the purpose of
pseudo code and flow charts (D-E)• Most of you will be able to write some
clear pseudo code and be able to translate others work (B-C)
• Some of you will add complicated functions into their pseudo code to make it complete advanced skills (A*-A)
Learning outcomes
BBBIT
How do you make a cup of tea? Is it anything like this?
Flow charts
BBBIT
Create a flow chart for how you would make a cup of tea or coffee using only these symbols?
Your turn
BBBIT
What is pseudo code?
This is when you write you ideas for a program in plain English to give you a good idea of how to structure your coding.
PSEUDO CODE
BBBIT PSEUDO CODEIf student's grade is greater than or equal to 60
Print "passed" else
Print "failed"
Begin one's move. Throw the dice. Move the number of spaces on the board shown on the dice. If the token landed on "Go to Jail,"
then go there immediately. Else if the token landed on "Chance" or "Community Chest,"
then draw a card and follow its instructions. Else
follow the usual rules for the square (buying property, paying rent, collecting $200 for passing "Go", etc.). End one's move.
BBBIT
How do we write it?We literally write the step by step guide of what is in our heads. If there is ever a ‘decision’ to be made then this is done like this;Leave the houseWhile not at station
Walk towards stationEndWhile train is not at station
Wait for trainEndGet on train
Pseudo Code