-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentGrade.py
More file actions
32 lines (26 loc) · 788 Bytes
/
Copy pathStudentGrade.py
File metadata and controls
32 lines (26 loc) · 788 Bytes
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
print("===== Student Grade Calculator =====")
name = input("Enter student name: ")
maths = float(input("Enter Maths marks: "))
python = float(input("Enter Python marks: "))
physics = float(input("Enter Physics marks: "))
english = float(input("Enter English marks: "))
data_structures = float(input("Enter Data Structures marks: "))
total = maths + python + physics + english + data_structures
percentage = total / 5
print("\n===== Result =====")
print("Student Name:", name)
print("Total Marks:", total)
print("Percentage:", percentage, "%")
if percentage >= 90:
grade = "A+"
elif percentage >= 80:
grade = "A"
elif percentage >= 70:
grade = "B"
elif percentage >= 60:
grade = "C"
elif percentage >= 50:
grade = "D"
else:
grade = "F"
print("Grade:", grade)