Algorithms (Steps and Logic)
Flowcharts
Computational Thinking
Python Basics
If, Labels and Goto Loops
100

What is an algorithm?

A set of step-by-step instructions to solve a problem

100

What shape do we use for a decision (yes/no)?

Diamond.

100

What is decomposition?

Breaking a big problem into smaller parts.

100

What does print("Hello") do?

Displays Hello on the screen.

100

What does an if statement do?

Checks a condition and runs code only if it's true.

200

Put these steps in order: Bake cake, Mix ingredients, Eat cake, Set timer.

Mix → Set timer → Bake → Eat.

200

What shape do we use for start/end?

Oval.

200

What is pattern recognition?

Finding similarities to help solve problems.

200

Which code asks the user their name?

input("What is your name? ")

200

What is wrong with this code?

label .start
name = input("Name?")
if name == ""

       goto .start
print("Hello ", name)


Missing colon at the end of if statement:

if name == "":

300

Is this an algorithm? “Make a sandwich.” Explain.

No — it is not detailed enough.

300

What shape do we use for process (e.g., “Add 1”)?

Rectangle.

300

What is abstraction?

Ignoring details you don’t need.

300

Identify the variable and its type: 

name = "Sam"

The variable is name. 

String variable

300

What does this loop do? 

label .a

ans = input("Say yes: ")

if ans != "yes":

    goto .a

print("Good job")

Repeats until user types “yes”.

400

Give one example of using an algorithm in real life.

Following a recipe, directions, brushing teeth, etc. - detailed step by step instructions provided

400

A flowchart diamond says “Is number > 10?” What are the two arrows?

Yes and No.

400

What is algorithmic thinking?

Creating clear, repeatable steps to solve a problem.

400

Fix the error:

print(Hello)  

print("Hello")

400

Fix the error:

if colour == "Red" or "Blue":    

         print("Nice colour!")


if colour == "Red" or colour == "Blue":

500

Fix this algorithm: 

  • Put on shoes

  • Put on socks

  • Tie shoes

  • Put on socks

  • Put on shoes

  • Tie shoes

500

Identify the error: A flowchart has no EXIT/END symbol.

It must end with an oval for END.

500

Give an example of decomposition when cleaning a room.

Clean desk → pick up clothes → make bed, etc.

500

What is wrong with this program?

colour = input("Enter colour")

print(colour

 

Missing closing paranthesis

colour = input("Enter colour")

print(colour)

500

Write a loop that keeps asking “Type OK” until the user types OK.

label .loop

ans = input("Type OK: ")

if ans != "OK":

    goto .loop

print("Thank you")