Answer to Question #297548 in Python for izzul

Question #297548

class Student:

  # Constructor

  def _init_(self):

    self.id_number = 0

    self.grades_list = []

    self.grades_total = 0



1
Expert's answer
2022-02-14T07:54:53-0500
class Student:
    def _init_(self, id_number=0, grades_list=None, grades_total=0):
        if grades_list is None:
            grades_list = []
        self.id_number = id_number
        self.grades_list = grades_list
        self.grades_total = grades_total

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS