• API
• FAQ
• Tools
• Archive
SHARE
TWEET

Untitled

a guest May 21st, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. import time
2.
3. # unweighted gpa calculator
5. print("Unweighted GPA Calculator \n----------------")
6. time.sleep(1.25)
7.
10.     coconut_shrimp_is_bomb = []
11.     # you cant change their mind, it's really good
12.
13.     print("Enter how many classes you take: ")
14.     fragile = int(input())
15.     persistent = 1
16.
17.     while persistent != fragile + 1:
18.         print("Enter class", persistent, "letter grade (B+, B, B-, etc.):")
19.         orange = input()
20.         orange = orange.upper()
21.         coconut_shrimp_is_bomb.append(orange)
22.         persistent += 1
23.     print(coconut_shrimp_is_bomb)
24.     nut = 0
25.     chimney = 0
26.     for cheeks in coconut_shrimp_is_bomb:
27.         if cheeks == "A+" or cheeks == "A":
28.             nut = nut + 4.0
29.         elif cheeks == "A-":
30.             nut = nut + 3.7
31.         elif cheeks == "B+":
32.             nut = nut + 3.3
33.         elif cheeks == "B":
34.             nut = nut + 3.0
35.         elif cheeks == "B-":
36.             nut = nut + 2.7
37.         elif cheeks == "C+":
38.             nut = nut + 2.3
39.         elif cheeks == "C":
40.             nut = nut + 2.0
41.         elif cheeks == "C-":
42.             nut = nut + 1.7
43.         elif cheeks == "D+":
44.             nut = nut + 1.3
45.         elif cheeks == "D":
46.             nut = nut + 1.0
47.         elif cheeks == "F":
48.             nut = nut + 0.0
49.     mystic = nut / len(coconut_shrimp_is_bomb)
50.     round(mystic, 2)
51.     print(round(mystic, 2), "is your unweighted GPA")
52.     time.sleep(2)
53.
54.
55.     print("\n\nAgain? y/n:")