Find the Largest Number Without max()
Intermediate · Write the code · from Python Lists: Create, Access, Modify, and Loop Through Lists
From the lesson: Python Lists: Create, Access, Modify, and Loop Through Lists
Think about your favorite music playlist. It has a bunch of songs stored in a specific order. You can add new songs, remove old ones, rearrange them, or skip to song number five.
Read the lessonFind the largest number in the list using a for loop. Do not use the built-in max() function.
Expected output:
95scores = [72, 85, 95, 60, 88]
# Find the largest score using a loop
# Print the largest score
More Lists exercises
- Create a List and Print Its LengthBeginner
- Access the Last Item with Negative IndexingBeginner
- Shopping List: Add and Remove ItemsBeginner
- Fix the Bug: IndexErrorBeginner
- Sum All Numbers Using a LoopBeginner
- Predict the Output: List AliasingIntermediate
- Reverse a List Without reverse() or [::-1]Intermediate
All Python exercises · 50 practice problems · Data Structures quiz