Question: Exercise 1 [Student Class] Create a class called student. It should have fields for name, id and a list of tuples (course, grade) for all
![Exercise 1 [Student Class] Create a class called student. It should](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f53240903f2_21666f5324023dd8.jpg)
Exercise 1 [Student Class] Create a class called student. It should have fields for name, id and a list of tuples (course, grade) for all courses the student has taken. Be sure to include an _init_method to initialize it with the three field values. Add a_str_method that returns a string representation of a student object in a simple way. For example, you create a student object as follows: s = Student ( 'cat', 123, [ ('comp1405', 78), ('comp1805', 87)] ) Exercise 2 [Accessing Student Data] Write a function called computeAverage(student) that takes a Student object as input and returns the average of all the courses the student has taken. If the student has not taken any courses, it returns -1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
