Lesson details

Key learning points

  1. In this lesson, we will be introduced to the concept of nesting 'if statements'. We will walk through some basic nested statements to check our understanding. We will then follow the PRIMM approach and investigate a 'guess the animal' game. We will then modify the game to improve the functionality of it.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

3 Questions

Q1.
If the user enters the colour: red and the suit: spades. What will the output be of this program?
An image in a quiz
My card is a match
Correct answer: My card is not a match
Q2.
If the user enters the colour: black and the suit: hearts. What will the output be of this program?
An image in a quiz
Correct answer: My card is a match
My card is not a match
Q3.
If the user enters the colour: black and the suit: diamonds. What will the output be of this program?
An image in a quiz
My card is a match
Correct answer: My card is not a match

3 Questions

Q1.
The user is prompted with "Username: " and enters "Eirini". What is the next prompt that they receive?
An image in a quiz
Access granted
Fish4321
Correct answer: Password:
There are no further prompts
Q2.
The user is prompted with "Username: " and enters "Ben". What is the next prompt that they receive?
An image in a quiz
Access granted
Fish4321
Password:
Correct answer: There are no further prompts
Q3.
The user is prompted with "Username: " and enters "Fish4321". What is the next prompt that they receive?
An image in a quiz
Access granted
Fish4321
Password:
Correct answer: There are no further prompts