stephaniesetiawan stephaniesetiawan
  • 14-04-2021
  • Computers and Technology
contestada

Write a Python code to take input of age of three people by user and determine youngest people among them

Respuesta :

ezioassasin55
ezioassasin55 ezioassasin55
  • 14-04-2021

Answer:

# Take Ages

person1 = eval(input("Enter age of person 1 : "))

person2 = eval(input("Enter age of person 2 : "))

person3 = eval(input("Enter age of person 3 : "))

# check youngest

if person1 < person2 and person1 < person3:

print("Person 1 is youngest")

elif person2 < person1 and person2 < person3:

print("Person 2 is youngest")

elif person3 < person1 and person3 < person2:

print("Person 3 is youngest")

Answer Link

Otras preguntas

What is 12% of 85 im having a hard time with this question
what is a good attention getter for starting a essay about my plans after high school
why did the United States avoid involvement in World War II until December 1941?
Why is american dream is not worth pursuing ?
Sin42cos17-cos42sin17
the bottom of a ladder must be placed 5 feet from a building. the ladder is 14 feet long. how far above the ground does the ladder touch the wall?
what is wrongith this sentence?     He did all the housework today.
What is the answer for this equation? -6x = -36
Wh does a soccer ball that is quickly rolling across a grass field slow and finally stops rolling
Sin42cos17-cos42sin17