Write a Python Program To Calculate The Grade Of A Student

 Write a Python Program To Calculate the Grade Of a Student From His marks From The Following Scheme:

90-100 →Ex

80-90 → A

70-80 → B

60-70 → C

50-60 →D

   <50 →F


Code :

marks = int(input("Enter Your Marks\n"))

if marks>=90:
    grade = "Ex"
elif marks>=80:
    grade = "A"
elif marks>=70:
    grade = "B"
elif marks>=60:
    grade = "C"
elif marks>=50:
    grade = "D"
else:
    grade = "F"

print("Your grade is " + grade)

Output :

Enter Your Marks
99
Your grade is Ex
Enter Your Marks
50
Your grade is D
Enter Your Marks
40
Your grade is F

Comments

Popular posts from this blog

Write A Python Program, Create n Empty Dictionary Allow 4 Friends To, Enter Their Favorite Programming Language As values and User Keys as their Name Assume That The Names Are Unique.

Write Python Program To Store Seven Fruits Name In a List Enter By The User