Q. Write a program that prints minimum and maximum of five numbers entered by the user.
Answer :-
lst = [ ] for i in range(5) : num = int( input("Enter a number :- ")) lst.append( num ) lst.sort() print("Maximum Value :-", lst [-1 ] ) print("Minimum value :-", lst[ 0 ])
Output :-
Enter a number :- 5
Enter a number :- 4
Enter a number :- 1
Enter a number :- 6
Enter a number :- 8
Maximum Value :- 8
Minimum value :- 1
>>>
Tttttt
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )