Write an if-elif-else chain that determines a person's stage of life. a) Set your age for the variable age. b) If the age is less than 0, print an error message, invalid age. c) If the age is less...


need help with python


Write an if-elif-else chain that determines a person's stage of life.<br>a) Set your age for the variable age.<br>b) If the age is less than 0, print an error message, invalid age.<br>c) If the age is less than 2 years old, print a message, you're a baby.<br>d) If the age is at least 2 years old but less than 4, print a message, you're a toddler.<br>e) If the age is at least 4 years old but less than 13, print a message, you're a kid.<br>f) If the age is at least 13 years old but less than 20, print a message, you're a teenager.<br>g) If the age is at least 20 years old but less than 65, print a message, you're an adult.<br>h) If the age is 65 or older, print a message, you're an elder.<br>Example Output<br>Age<br>= 20<br>You're an adult.<br>2.<br>

Extracted text: Write an if-elif-else chain that determines a person's stage of life. a) Set your age for the variable age. b) If the age is less than 0, print an error message, invalid age. c) If the age is less than 2 years old, print a message, you're a baby. d) If the age is at least 2 years old but less than 4, print a message, you're a toddler. e) If the age is at least 4 years old but less than 13, print a message, you're a kid. f) If the age is at least 13 years old but less than 20, print a message, you're a teenager. g) If the age is at least 20 years old but less than 65, print a message, you're an adult. h) If the age is 65 or older, print a message, you're an elder. Example Output Age = 20 You're an adult. 2.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here