1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
rosijanka [135]
3 years ago
10

The base class Pet has attributes name and age. The derived class Dog inherits attributes from the base class Pet class and incl

udes a breed attribute. Complete the program to: Create a generic pet, and print the pet's information using print_info(). Create a Dog pet, use print_info() to print the dog's information, and add a statement to print the dog's breed attribute.

Engineering
1 answer:
Nonamiya [84]3 years ago
3 0

Answer:

Explanation:

class Pet:

   def __init__(self):

       self.name = ''

       self.age = 0

   def print_info(self):

       print('Pet Information:')

       print('   Name:', self.name)

       print('   Age:', self.age)

class Dog(Pet):

   def __init__(self):

       Pet.__init__(self)

       self.breed = ''

def main():

   my_pet = Pet()

   my_dog = Dog()

   pet_name = input()

   pet_age = int(input())

   dog_name = input()

   dog_age = int(input())

   dog_breed = input()

   my_pet.name = pet_name

   my_pet.age = pet_age

   my_pet.print_info()

   my_dog.name = dog_name

   my_dog.age = dog_age

   my_dog.breed = dog_breed

   my_dog.print_info()

   print('   Breed:', my_dog.breed)

main()

You might be interested in
Energy.
alexandr402 [8]

Answer:

modern vehicles are made to crunch up a little bit so they that absorbe some of the impact instead of you

Explanation:

8 0
3 years ago
Which option is an example of a physical model?
Burka [1]

Answer:

A. A clay ball with a slice cut out, showing the layers of the earth

Explanation:

6 0
3 years ago
Once you have chosen a topic, what should you do before beginning the research process? a. Find as many possible facts and detai
dlinn [17]

Answer:

The answer is C

Explanation:

3 0
3 years ago
What is the basic molecular mechanism for polymer plasticity, and how does it differ from that of ductile crystalline metals?
sdas [7]

Answer:

In Crystalline metals or materials, plasticity is examined from the perspective of the motion of linear defects or dislocations within the polymer chains.

Explanation:

When a temperature range below and near the glass transition temperature is reached, there is warping or contortion of structureless or malformed polymers. This warping happens as the polymer chains move over one another.

Unlike elasticity when requires or enables an object to resume its original dimensions, ductility is the quality of an element or material to change form albeit permanently.

Cheers

4 0
3 years ago
Please help me it’s for science I only have a few minutes
7nadin3 [17]

Answer:

Rocks

Explanation:

I am not sure tho bc they are made out of coal and I think coal is a kind of rock

3 0
2 years ago
Read 2 more answers
Other questions:
  • The uniform dresser has a weight of 90 lb and rests on a tile floor for which the coefficient of static friction is 0.25. If the
    6·1 answer
  • A corroded metal gusset plate was found on a bridge. It was estimated that the original area of the plate was 750 cm2 and that a
    11·1 answer
  • What is the capacity of the machine in batches?
    10·1 answer
  • A large heat pump should upgrade 5 MW of heat at 85°C to be delivered as heat at 150°C. Suppose the actual heat pump has a COP o
    15·1 answer
  • Which happens when a wave passes through an opening
    12·2 answers
  • The mean of 10 numbers is 9, then the sum (total) of these numbers will be​
    10·2 answers
  • Please help me with this, picture.
    15·1 answer
  • 30POINTS
    15·2 answers
  • Draw a sinusoidal signal and illustrate how quantization and sampling is handled by
    8·1 answer
  • the left rear brake drum is scored, but the right rear drum looks as good as new. technician a says the left-side drum should be
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!