Computer Science, asked by gargiarora3404, 5 months ago

Write a program to print the grade of a student, based upon the average marks he/she has scored.

Condition Grade

>90 and <=100 A+

>80 and <=90 A

>70 and <=80 B+

>60 and <=70 B

>50 and <=60 C+

>40 and <=50 C

<=40 D​

Answers

Answered by jai696
3

\huge\red{\mid{\fbox{\tt{Using\: Python\: 3}}\mid}}

def grader(marks):

if 90 < marks <= 100:

return "A+"

if 80 < marks <= 90:

return "A"

if 70 < marks <= 80:

return "B+"

if 60 < marks <= 70:

return "B"

if 50 < marks <= 60:

return "C+"

if 40 < marks <= 50:

return "C"

return "D"

print("Grade:", grader((_ := float(input("marks: ")))))

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Similar questions