lele1141 lele1141
  • 07-06-2021
  • Mathematics
contestada

Does anybody know 5.4.7: Teenagers CodeHs. Please help I am stuck in this

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 08-06-2021

Answer:

The program in Python is as follows:

age = int(input("Age: "))

if age>=13 and age <=19:

   print("Teenager")

else:

   print("Not a teenager")

Step-by-step explanation:

This gets input for age

age = int(input("Age: "))

This checks if age is between 13 and 19 (inclusive)

if age>=13 and age <=19:

If yes, the age is teenage

   print("Teenager")

If otherwise, the age is not teenage

else:

   print("Not a teenager")

Answer Link

Otras preguntas

..............................................................................
Given that the United States is the first major democratic government in world history, need we have a special concern about the emergence of authoritarianism?​
Deborah Miles bought 3 t-shirts for $7.50 each and a sweatshirt for $22.95. How much change did she receive from a $50 bill?
NAME THE 6 STEPS OF THE SCIENTIFIC METHOD.
how do the lengths of the corresponding sides compare? How do you know?
Solve 5n-7p+3n=25p for n
Altitude: An airplane was at a cruising altitude, then descended 2000 feet. If the airplane is at 18,000 feet now, what was the cruising altitude?
Need help with these
A = 1/2(a+b) h For h
What is the midpoint of the line segment with endpoints (-1,3) and (-5,5)?