Respuesta :
largest = int(input("Enter a number: "))
print("Largest: {}".format(largest))
i = 0
while i < 5:
num = int(input("Enter a number: "))
if num > largest:
largest = num
print("Largest: {}".format(largest))
i += 1
I hope this helps!
The program illustrates the use of conditional statements and iterations
The complete program in Python is as follows, where comments are used to explain each line.
#This gets the first input from the user
userNum = int(input("Enter a number: "))
#This prints the first input as the largest
print("Largest:",userNum)
#This assigns to largest, the value of userNum
largest = userNum
#The following iteration is repeated 5 times
for i in range(5):
#This gets another input from the user
userNum = int(input("Enter a number: "))
#This checks if current input is greater than the current largest input
if userNum > largest:
#If yes, this assigns to largest, the value of userNum
largest = userNum
#This prints the current largest input
print("Largest:",largest)
In each iteration, the program prints the current largest input
See attachment for the sample run
Read more about iteration and conditions at:
https://brainly.com/question/18809878