Answer to Question #267717 in Python for NITHIN

Question #267717

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.


1
Expert's answer
2021-11-17T12:00:56-0500
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))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS