← Back to Loops
Question 361
Largest With A Loop
Largest With A Loop
Four whole numbers are read into a list. Find the largest with a for loop that keeps a largest variable, starting it at the first item and replacing it whenever a bigger value comes along (no max()). Print the result in the form Largest: <value>. Input: four integers, one per line, no prompts.
Expected Output:
Largest: 9= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Loops
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.