Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For the following code and using the help ( ) function on the Atm _ Moon class, what method ( s ) are inherited from

For the following code and using the help() function on the Atm_Moon class, what method(s) are inherited from SolarSystem?
class SolarSystem:
def __init__(self, name):
self.name = 'Sun'
def show_ss_name(self):
return f'The only star in our solar system is the {self.name}'
class Planet(SolarSystem):
def __init__(self, name):
self.name = name
self.orbits_a_star = True
self.mass_enough_to_form_a_sphere = True
self.cleared_neighborhood_around_orbit = True
def show_name(self):
return f'I am planet {self.name}'
class Atm_Moon(Planet):
def __init__(self, name, atm_type, num_Moons):
super().__init__(name)
self.moons = num_Moons
self.atmosphere = atm_type
def show_moons(self):
return f'I have {self.moons} moons'
def show_atmosphere(self):
return f'My atmosphere is mostly {self.atmosphere}'
P4wAM = Atm_Moon('Mars', 'carbon dioxide',2)
show_ss_name(self)
show_name(self)
__init__(self, name, atm_type, num_Moons)
show_moons(self)
show_atmosphere(self)
show_ss_name(self)
show_name(self)

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

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

More Books

Students also viewed these Databases questions

Question

Why is intrinsic motivation healthier than extrinsic motivation?

Answered: 1 week ago

Question

Which approach is least fitting for the job? Explain.

Answered: 1 week ago

Question

How is the compensation for sales representatives determined?

Answered: 1 week ago