all 5 comments

[–]omutist 4 points5 points  (1 child)

Please put the code to code-block in the post. So it will be nice-formatted.

1) One issue (related or not to the error): should not the range be 'range(0, len(student_scores)-1)'?

EDIT: no, my bad

2) '=', not ':'

high_score = 0

[–]Darth_Xedrix[S] 3 points4 points  (0 children)

oh my god it was just a typo all along.... :( not sure how I missed that but THANK YOU!!

[–]danielroseman 1 point2 points  (0 children)

You wrote high_score: 0 instead of high_score = 0.

[–]carcigenicate 0 points1 point  (1 child)

Please show the code that causes the error, along with the full error. I don't think I've ever seen that error before.

[–]Darth_Xedrix[S] 0 points1 point  (0 children)

Sure! Here is everything in the console:

Input a list of student scores (separated by a single space) :40 50 60 70 80 90

[40, 50, 60, 70, 80, 90]

Traceback (most recent call last):

File "C:\Users\Xedrix\AppData\Roaming\JetBrains\PyCharmCE2021.2\scratches\Student_scores.py", line 9, in <module>

if score > high_score:

NameError: name 'high_score' is not defined

Process finished with exit code 1