0

Help me to fix it please!

name = input() sem1_score = int(input()) sem2_score = int(input()) sr = ( sem1_score + sem2_score ) / 2 if ( sr <= 100 and sr >= 90 ): print ("50%") elif ( sr <= 89 and sr >= 80): print ("30%") elif ( sr <= 79 and sr >= 70): print ("10%") else: print ("0%") Line 3, EOF when reading a line.

20th Dec 2020, 6:42 AM
Helga
Helga - avatar
3 Respuestas
+ 4
EOF when reading line means the input of the user is lacking, in other words the other variable that has input has not been filled up. You need to input values in sololearn by every line, for example if you have 3 variables that needs input, the input in code playground should be like this: Nicko 85 75 - - - - - - - - - - - - - - - - - - - - - - 'Nicko' is assigned in 'name' variable. 85 is assigned in 'sem1_score' variable. 75 is assigned in 'sem2_score'. And by this, it will cause no error because the variables with 'input' have now values. I hope this helps, Happy Coding!
20th Dec 2020, 6:47 AM
noteve
noteve - avatar
+ 1
Thank you! It works 🌿
20th Dec 2020, 6:53 AM
Helga
Helga - avatar
+ 1
There is another error. Test your code with 90 and 89. sr is a float and can fall between 89 and 90 (or 79/80). You should delete the conditions sr <= 89/79
20th Dec 2020, 8:05 AM
Benjamin Jürgens
Benjamin Jürgens - avatar