The manager of the company has informed his assistant to enter the age of all the workers working in production department. Among all he has to find the employee with minimum age employee. Help the manager to find the minimum age employee by storing the all age of all employeesin 1D array. Use functions to solve this task.
def MinAge(ages):
min = ages[0]
del ages[0]
for age in ages:
if age < min:
min = age
return min
ages = [int(i) for i in input().split()]
print('Min age is', MinAge(ages))
Comments
Leave a comment