Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use this code to select the statement below that best describes why there is an error in the str method. class Student: def ( self

Use this code to select the statement below that best describes why there is an error in the
str
method.
class Student:
def (self, name, ID):
self._name = name
self._ID = ID
self._test_scores =[]
def method_1(self, score):
self._test_scores.append(score)
def method2(self):
if len(self._test_scores)> :
return sum(self._test_scores)/len(self._test_scores)
else:
return
#THIS METHOD HAS AN ERROR
def method_3(self):
score = nethod 2()
if score 90 :
return 'A'
elif score 80 :
return 'B'
elif score 70 :
return 'C'
elif score 60 :
return 'D'
return 'F'
def method_4(self):
return self._name
def method_5(self):
return self._ID
#THIS METHOD HAS AN ERROR
def (self):
print ('student with ID', ID,' has current scores:', self, test scores)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Describe the role of HRD practitioners in OD interventions

Answered: 1 week ago