Answer to Question #225367 in Python for raj

Question #225367

You are given N number of inputs. Print the maximum of them after each input.




1
Expert's answer
2021-08-13T01:48:05-0400
list1 = []
N = int(input('Enter integer here: '))
for i in range(N):
    s = eval(input('Enter no here:'))
    list1.append(s)
    print(max(list1))



Enter integer here: 4
Enter no here:5
5
Enter no here:5.2
5.2
Enter no here:4
5.2
Enter no here:6
6

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