0
how to solve this?
Complete the code to iterate through the grades list and display only values greater than 50 for grade [in] grades: if grade <= 50: [ ] print(grade)
6 Antworten
+ 6
for grade in grades:
if grade > 50:
print(grade)
+ 2
Stop that iteration and go on with next one. What do you think: break or continue?
+ 2
Oma Falk Maybe or maybe not, because SL sometimes add some messy code that doesn't make sense in order for the user to learn how to correct the mistakes.
0
I'll be back when I reach that task to find out if there should be any breaks or not!
0
Jan I think, the brackets have to be filled.
0
for grade in grades:
if grade <= 50:
continue
print(grade)
since we don’t have any additional conditions, we simply set a continuation.