-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask_5.py
36 lines (31 loc) · 799 Bytes
/
task_5.py
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
while True:
print("Enter the username: ")
username = input()
if username == "end":
print("Goodbye")
break
print("Enter the User's Exam Mark")
exam_mark = float(input())
if exam_mark == "end":
print("Goodbye")
break
def check_grade(mark):
if mark > 55:
return "A"
elif mark == 55:
return "A"
elif mark > 50:
return "B"
elif mark == 50:
return "B"
elif mark > 40:
return "C"
elif mark == 40:
return "C"
elif mark > 30:
return "D"
elif mark == 30:
return "D"
elif mark < 30:
return "E"
print(str(username) + "'s mark is " + str(check_grade(exam_mark)))