If the ages of Ram, Shyam and Ajay are input through the keyboard, Python Program to determine the youngest of the three.

print(" Enter the ages of Ajay :")
Ajay = int(input())
print("\n Enter the ages of Ram :")
Ram = int(input())
print("\n Enter the ages of Shyam :")
Shyam = int(input())
if Ram < Ajay and Ram < Shyam :
	print("\n The youngest of the three is Ram")
elif Ajay < Ram and Ajay < Shyam :
	print("\n The youngest of the three is Ajay")
elif Shyam < Ram and Shyam < Ajay :
	print("\nThe youngest of the three is Shyam")
else :
	print("\nSame Age")

Output :
Enter the ages of Ajay,Ram,Shyam :20
30
40

The youngest of the three is Ajay



Leave a comment