This lesson contains 3 slides, with interactive quiz and text slides.
Lesson 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:-<div>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"</div>
Exercise 2
2. Improve the program to ask the user to input their age.