grade calculation in python
Python Program to get a mark of a student and find its grade.
Sample Input 1:
75
Sample Output 1:
C
Flow Chart Design

Try your Solution
Strongly recommended to Solve it on your own, Don't directly go to the solution given below.
#write your code here
Program or Solution
mark=int(input("Enter Mark:"))
if(mark>95 and mark<=100):
print("O Grade")
elif(mark>90 and mark<=95):
print("A grade")
elif(mark>80 and mark<91):
print("B Grade")
elif(mark>70 and mark<81):
print("C Grade")
elif(mark>60 and mark<71):
print("D Grade")
elif(mark>49 and mark<61):
print("E Grade")
elif(mark>=0 and mark<50):
print("F Grade")
else:
print("Invalid Mark")
Program Explanation
chained conditional check is used here to check the mark range.
any one of the grade will be displayed.
Comments
Related Programs
- Python if example
- Greatest of two numbers in Python
- Smallest of two numbers in python
- ODD or Even in Python
- 3 digit number or not in python
- Greatest of three numbers in Python
- Smallest of three numbers in Python
- Divisible by 3 or not in python
- Leap year in python
- Last digit divisible by 3 or not in python
- Calculator in python
- else if in python
- check whether bit is set in python
- odd or even using bitwise operator in python
coming Soon
coming Soon