0

Python Developer

Complete the code to iterate through the grades list and display only values greater than 50

15th Sep 2025, 12:46 PM
Purity Iwuoha
7 Risposte
+ 7
Purity Iwuoha , if you like to get help, please show us your *current code try* first.
15th Sep 2025, 12:52 PM
Lothar
Lothar - avatar
+ 4
At first glance, I noticed two errors: 1. There is no indentation after the for loop condition. On the next line of code, add at least four spaces to the right. 2. The addition and assignment operator 👉 += is just hanging in the air. Variables or values should be written to the left and right of them
15th Sep 2025, 1:06 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 1
Ohh yeah thank you
15th Sep 2025, 1:52 PM
Purity Iwuoha
0
for grade in grades: if grade <= 50: += print(grade)
15th Sep 2025, 12:55 PM
Purity Iwuoha
0
That += is wrong What could be the answer
15th Sep 2025, 12:56 PM
Purity Iwuoha
0
Grades + 1
15th Sep 2025, 4:21 PM
Hackmonger
0
grades = [23,54,78,24,63,38,60,59] for i in grades: print(i, end = ' ') if i > 50 else None
16th Sep 2025, 3:43 PM
Md Mehedi Hasan
Md Mehedi Hasan - avatar