If the ages of Ram, Shyam and Ajay are input through the keyboard, write a program to determine the youngest of the three.
This program is a simple Python script that takes input of the ages of three individuals, Ram, Shyam, and Ajay. It then uses an if-else statement to compare the ages of the three individuals and determine which one is the youngest.
In summary, the program takes input of the ages of three individuals, compares their ages using an if-else statement, and determines which one is the youngest, it then prints the name of the youngest person.
age1 = int(input("Enter the Age of Ram :")) age2 = int(input("Enter the Age of Shyam :")) age3 = int(input("Enter the Age of Ajay :")) if(age1<age2 and age1<age3): print("The Youngest Age is Ram") elif(age2<age1 and age2<age3): print("The Youngest Age is Shyam") else: print("The Youngest Age is Ajay")
Enter the Age of Ram :23 Enter the Age of Shyam :21 Enter the Age of Ajay :25 The Youngest Age is Shyam
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions