Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Subject Grade Date Block week Unit/Lesson/Topic Work sheet

ICT 9 2 3 tasks 6 out of 16


Use branching instructions (IF, THEN, ELSE) within a text-based
programming language.
Learning Outcome
• Differentiate between IF and nested IF
/Objective:
• Use branching instructions (IF, THEN, ELSE) within a text-
based programming language to produce a program
Student Name: ………………………………………………………………………………………………………………………. Class 9

Contents
1. Program 1
2. Program 2
3. Program 3

Prepared by P a g e |1
Subject Grade Date Block week Unit/Lesson/Topic Work sheet
ICT 9 2 3 If statement 5 out of 16
• Differentiate between IF and nested IF
Objective: • Use branching instructions (IF, THEN, ELSE) within a text-based
programming language to produce a program
Student Name: ………………………………………………………………………………………………………………………. Class 9

Program 1
Create a program that asks the user to answer the question “What is the suitable
age to watch an action movie?” If the number is less than 18, print the answer
“You can’t watch this movie.” Otherwise, if the answer is higher than 18 prints
“You can watch this movie.”
Take a screenshot of your program, save it with your name on your flash
memory.

Program 2
You are going to create a program that asks the user to enter three different
numbers. Then compare between the three numbers which one is the biggest
number and print it.
Take a screenshot of your program, save it with your name on your flash
memory.

Program 3
Create a program that asks the user to enter their password. If they enter the
word “PASSWORD” then display the message “Welcome to the treasure”,
otherwise display a message which says “go away, it’s all mine”.
Take a screenshot of your program, save it with your name on your flash
memory.

Prepared by P a g e |2

You might also like