3.6 Code Practice
Write a program to input 6 numbers. After each number is input, print the biggest of the numbers entered so far.
Example:
Enter a number: 1
Largest: 1
Enter a number: 3
Largest: 3
Enter a number: 4
Largest: 4
Enter a number: 9
Largest: 9
Enter a number: 3
Largest: 9
Enter a number: 5
Largest: 9
Answers
Answered by
0
A request to @BrainlyYoda
With respect,
Delete my account you stu pid !!
Ab rok ke dikhao
Answered by
3
=Write a program to input 6 numbers. After each number is input, print the biggest of the numbers entered so far. Example: Enter a number: 1 Largest: 1 Enter a number: 3 Largest: 3 Enter a number: 4 Largest: 4 Enter a number: 9 Largest: 9 Enter a number: 3 Largest: 9 Enter a number: 5 Largest: 9 (Please answer I've been stuck on this problem for days)
Expert's answer
largest = None
for i in range(0,6):
d = int(input("Enter a number: "))
if not largest or d > largest:
largest = d
print("Largest: " + str(largest))
Similar questions