I am new to python and struggling with a homework problem. I need to create a method to count the number of credits a student has accumulated, and return that number as a float
I am at a loss on how to proceed. I have listed the two classes I have created, and need
class Course(object):
def __init__(self, title, year, semester, credits, grade):
self.title = title
self.year = year
self.semester = semester
self.credits = credits
self.grade = grade
class StudentRecord(object):
def __init__(self, firstName, lastName, dob, hsName, hsCity, hsState, degree, address, transcript = [], newcourse = []):
self.firstName = firstName
self.lastName = lastName
self.dob = dob
self.hsName = hsName
self.hsCity = hsCity
self.hsState = hsState
self.degree = degree
self.address = address
self.transcript = transcript
self.newcourse = newcourse
def credits():
I know the first two classes work in my Mimir assignment but am struggling on how to proceed with the def credits():
Any help would be greatly appreciated.