Задача Задача №82828
А
А
To find the youngest candidate, compare their ages and output the name of the candidate with the lower age. Here's how you can do it:
name1 = input("Введите имя первого кандидата: ")
age1 = int(input("Введите возраст первого кандидата: "))
name2 = input("Введите имя второго кандидата: ")
age2 = int(input("Введите возраст второго кандидата: "))
if age1 < age2:
print(name1)
else:
print(name2)
When you run this code and input the names and ages of the candidates, it will output the name of the youngest candidate. In this case, it will output "Маша" since her age is lower than "Костя".
