Exercise using "if " statements

Exercise using "if " statements
1 / 3
next
Slide 1: Slide
Ilearningdeal@gmail.comFurther Education (Key Stage 5)

This lesson contains 3 slides, with interactive quiz and text slides.

time-iconLesson duration is: 50 min

Items in this lesson

Exercise using "if " statements

Slide 1 - Slide

if - statements 

python Copy code
age = 20
if age < 13:
    print("Child")
elif age < 20:
    print("Teenager")
else:
    print("Adult")


Exercise 1
Using onlinegdb- do the following:-
1.  Include another "elif " statement to select ages between 20 - 39 and print out " You are young"  anything above that Print "You are a mature person"
Exercise 2
2. Improve the program to ask the user to input their age.

Slide 2 - Slide

How did you get on?
Not so well
I did ok
I did very well

Slide 3 - Poll