Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1, Parts 1 & 2 of 6 0.0/1.0 point (ungraded) 1| class Movie: 2| def __init__(self, new_title, new_year, new_budget, initial_gross): 3| self.title = new_title

Problem 1, Parts 1 & 2 of 6

0.0/1.0 point (ungraded)

 1| class Movie: 2| def __init__(self, new_title, new_year, new_budget, initial_gross): 3| self.title = new_title 4| self.year = new_year 5| self.budget = new_budget 6| self.gross = initial_gross 7| 8| def get_gross(self): 9| return self.gross 10| 11| def set_gross(self, new_value): 12| self.gross = new_value 13| 14| def get_net(self): 15| the_net = self.gross - self.budget 16| return the_net 17| 18| new_movie = Movie("Titanic", 1997, 200000000, 659363944) 

The class definition for a class called Movie is given above. Line 18 creates a new instance of Movie. Read through it and identify the attributes and methods.

Which of the following would be attributes (but not methods) of the Movie class? (You must selected all of them correctly to get credit)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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