-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgrade.py
More file actions
38 lines (36 loc) · 1.26 KB
/
Copy pathgrade.py
File metadata and controls
38 lines (36 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
roll = (input("Roll_no: "))
name = input("Name: ")
clas = input("Class: ")
Eng= int(input("Enter marks in English"))
Math= int(input("Enter marks in Maths"))
Sci= int(input("Enter marks in Science"))
S_sc= int(input("Enter marks in Social Science"))
comp= int(input("Enter marks in Computer"))
Total= Eng+Math+Sci+S_sc+comp
print("----------------------------------------------")
print(f"Roll No: {roll}")
print(f"Name : {name}")
print(f"Class : {clas}")
print("----------------------------------------------")
print("Subject Full marks Marks Obtained")
print(f"English | 100 | {Eng}")
print(f"Maths | 100 | {Math}")
print(f"Science | 100 | {Sci}")
print(f"Social Science | 100 | {S_sc}")
print(f"Computer | 100 | {comp}")
print("----------------------------------------------")
print(f"Total | 500 | {Total}")
marksp = Total/5
if marksp >=80.0:
print("O Grade")
elif marksp <=79.0 and marksp >= 70.0 :
print("A Grade")
elif marksp <=69.0 and marksp >= 60.0 :
print("B Grade")
elif marksp <=59.0 and marksp >= 50.0 :
print("C Grade")
elif marksp <=49.0 and marksp >= 40.0 :
print("D Grade")
else:
print("Fail")
print("Program by Udit Madaan")