Grade for Marks code using Python PROJECT 3

 Grade for Marks code :

  • If students scores 90, the result is Excellent because the is above 75.
  • For scores of 60, the result is Pass as it more than 40 but less than 75.
  • And if the score is 30, your program should print Fall because the score greater than 0.



problem 1 : For scores 75 or above, it should print excellent 
problem 2 : if the score is 40 or more it should print pass
problem 3 : otherwise if score is 0 or higher print Fail

code :

score = int(input("Enter the score: "))

if score >= 75:
    print("Excellent")

elif score >= 40:
    print("Pass")

elif score >= 0:
    print("Fail")

else:
    print("Invalid score")

Output :
Enter the score: 90
Excellent

  • You have to must try in your python compiler use idle avoid online compilers to Errors

Post a Comment

0 Comments