Question: You make an instance of the class and try to call the update method but it doesn't work: test = Custom ( ) test.update (

You make an instance of the class and try to call the update method but it doesn't work:
test = Custom()
test.update(75)
Which statement below best describes why your main program (the two lines above) fails?
The user does not have access to the update method
We have to assign new_val to self.new_val in order for this to work, i.e.:
self.new_val = new_val
When we created the object, we didn't pass anything in to the constructor
You cannot change the value of a variable defined in the constructo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!