Codelab help PYTHON There is a class called Roster whose con

Codelab help!! PYTHON!

There is a class called Roster whose constructor takes a List of tuples with the names of students and their grades in the class, for example -- [(\'Richard\', 98), (\'Benny\', 55), (\'Katie\', 87), (\'Sally\', 76)].
Create an instance of the Roster class, including the following students and their respective grades, and store it in the variable  mathClass: Jacob, 65 Frankie, 86 Lina, 94 Arnold, 63 Amanda, 87

What I have so far:

mathClass= Roster.append[(\'Richard\', 98), (\'Benny\', 55), (\'Katie\', 87), (\'Sally\', 76)]

Solution

class Roster(object): def __init__(self, students): self.students = students mathClass = Roster([(\"Jacob\", 65), (\"Frankie\", 86), (\"Lina\", 94), (\"Arnold\", 63), (\"Amanda\", 87)])
Codelab help!! PYTHON! There is a class called Roster whose constructor takes a List of tuples with the names of students and their grades in the class, for exa

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site