0
Help me to solve this problem.
https://sololearn.com/compiler-playground/cS3Yu0qNW44b/?ref=app
5 Answers
+ 1
Thanks brođ
0
Anirudh Kavediya
"If" must be in all lowercase
Python is a case sensitive language
0
Anirudh Kavediya And, use "elif", not "else". else always goes after "if" and "elif" (elif stands for else if)
Else is a last resort if all conditions are false, it runs.
0
Anirudh Kavediya Sorry for another ping
there were more issues, like, you need to convert the user input to a integer as python saves them as strings. and the correct syntax for print is print("string")
here is the corrected code:
student_marks = int(input())
if student_marks > 60:
print("pass")
elif student_marks < 60:
print("failed")
print(student_marks)
0
np