Page 1 of 1

Python Implement the design of the StudentDatabase class so that the following output is produced: GPA = Sum of (Grade P

Posted: Thu Jul 14, 2022 2:13 pm
by answerhappygod
Python
Implement the design of the StudentDatabase class sothat the following output is produced:
GPA = Sum of (Grade Points * Credits)/ Creditsattempted
# Write your code here
# Do not change the following lines ofcode.
s1 = StudentDatabase('Pietro', '10101222')
s1.calculateGPA(['CSE230: 4.0', 'CSE220: 4.0', 'MAT110:4.0'], 'Summer2020')
s1.calculateGPA(['CSE250: 3.7', 'CSE330: 4.0'],'Summer2021')
print(f'Grades for {s1.name}\n{s1.grades}')
print('------------------------------------------------------')
s1.printDetails()
s2 = StudentDatabase('Wanda', '10103332')
s2.calculateGPA(['CSE111: 3.7', 'CSE260: 3.7', 'ENG101:4.0'], 'Summer2022')
print('------------------------------------------------------')
print(f'Grades for {s2.name}\n{s2.grades}')
print('------------------------------------------------------')
s2.printDetails()