-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGradingProgram
More file actions
31 lines (27 loc) · 874 Bytes
/
Copy pathGradingProgram
File metadata and controls
31 lines (27 loc) · 874 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
print("Welcome to exam calculator")
print()
NameOftest = input("What is name of the exam? ")
print()
total_score = int(input("Max. Possible score:"))
your_score = int(input("Your score: "))
print()
number_score = float( your_score /
total_score)
final_number = round(number_score, 2)
final_perc = round(float(your_score /
total_score)*100, 2)
print("you got",final_perc,"%")
if final_number >= .90:
print("your letter score is an A+")
elif final_number >= .80 and final_number <=.89:
print("your letter grade is an A-")
elif final_number >= .70 and final_number <=.79:
print("your letter score is a B.")
elif final_number >= .60 and final_number <=.69:
print("your letter grade is a C.")
elif final_number >= .50 and final_number <=.59:
print("your letter grade is a D")
elif final_number <= .49:
print("your letter grade is U.")
else:
print("try again")