Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. Age Classifier Write a program that asks the user to enter a person\'s age. T

ID: 3785121 • Letter: 3

Question

3. Age Classifier

Write a program that asks the user to enter a person's age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: If the person is 1 year old or less, he or she is an infant. If the person is older than 1 year, but younger than 13 years, he or she is a child. If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. If the person is at least 20 years old, he or she is an adult.
( can you please do it by python idle)
thank you 3. Age Classifier

Write a program that asks the user to enter a person's age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: If the person is 1 year old or less, he or she is an infant. If the person is older than 1 year, but younger than 13 years, he or she is a child. If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. If the person is at least 20 years old, he or she is an adult.
( can you please do it by python idle)
thank you

Write a program that asks the user to enter a person's age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: If the person is 1 year old or less, he or she is an infant. If the person is older than 1 year, but younger than 13 years, he or she is a child. If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. If the person is at least 20 years old, he or she is an adult. Write a program that asks the user to enter a person's age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: If the person is 1 year old or less, he or she is an infant. If the person is older than 1 year, but younger than 13 years, he or she is a child. If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. If the person is at least 20 years old, he or she is an adult.
( can you please do it by python idle)
thank you

Explanation / Answer

So, the program for Age Classifier is as follows, the following is done in Python 3: -

Here is the Corrected code, Sorry for the Inconvinience

Code: -

print("Age Classifier")

age=float(raw_input("Enter the person's Age:"))

if age<=1 and age>0:

        print("Person is an infant")

elif age>1 and age<13:

        print("Person is a child")

elif age>=13 and age<20:

        print("Person is a teenager")

elif age>=20 :

        print("Person is an adult")

else:

        print("Please Enter a Valid age.")

Thank You for using Chegg...

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote