MENU
Question -

Write a program to input тАШnтАЩ employeesтАЩ salary and find minimum & maximum salary among тАШnтАЩ employees.



Answer -

t=tuple( )
n=input(тАЬEnter total number of employeesтАЭ)
for i in range(n):
a=input(тАЬenter salary of employee:тАЭ)
t=t+(a,)
print тАЬmaximum salary=тАЭ,max(t)
print тАЬminimum salary=тАЭ,min(t)
Output :
Enter total number of employees 3
enter salary of employee: 7800
enter salary of employee: 8934
enter salary of employee:
6544 maximum salary = 8934
minimum salary = 6544

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×