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
What is electromagnetic induction?
Over [174]
The process of using magnetic fields to produce voltage.
6 0
3 years ago
A seamless pipe carries 2400m³ of steam per hour at a pressure of 1.4N/mm².The velocity of flow is 30m/s.assuming the tensile st
MatroZZZ [7]

Answer:

yessss

Explanation:

7 0
2 years ago
Before finishing and installing a shelved cabinet you just constructed, you need to check the
Greeley [361]

Answer:

Carpenter's square

Explanation:

The most common hand tool used to measure or set angles with its application extending to setting angles of roofs and rafters. Another name of a Carpenter's square is a framing square.

Other hand tools that are used to measure angles are;

  • The combination square that allows a user to set both 90°  and 45° angles
  • A Bevel that allows users to set any angle they like.
  • A Protractor that resembles a bevel but its marks are marked in an arc.
  • An electromagnetic angle finder which gives a reading according to the measure of the arms adjusted by the user.
7 0
3 years ago
Give five general principles involved in the process of sewage filtration?​
aleksandr82 [10.1K]

Answer:

Some general principles are given below in the explanation segment.

Explanation:

Sewage treatment seems to be a method to extract pollutants from untreated sewage, consisting primarily of domestic sewage including some solid wastes.

<u>The principles are given below:</u>

  • Unless the components throughout the flow stream become greater than the ports or even the gaps throughout the filter layer, those holes would be filled as either a result of economic detection.
  • The much more common element of filtration would be the use of gravity to extract a combination.
  • Broadcast interception or interference.  
  • Inertial influence.
  • Sieving seems to be an excellent method to distinguish particulates.

8 0
3 years ago
Gold forms a substitutional solid solution with silver. Compute the number of gold atoms per cubic centimeter for a silver-gold
evablogger [386]

Answer:

Compute the number of gold atoms per cubic centimeter = 9.052 x 10^21 atoms/cm3

Explanation:

The step by step and appropriate substitution is as shown in the attachment.

From number of moles = Concentration x volume

number of moles = number of particles/ Avogadro's number

Volume = mass/density, the appropriate derivation to get the number of moles of atoms

5 0
3 years ago
Other questions:
  • You start your car and begin to pull out of a parking space. After leaving the space, You notice that the brake light on your in
    12·1 answer
  • Discuss four (4) advantages of direct and indirect water supply system.
    5·2 answers
  • The water level in a large tank is maintained at height H above the surrounding level terrain. A rounded nozzle placed in the si
    9·1 answer
  • Can someone Please help me..? If I'm your Onii-San then answer. And get brainliest. Make sure to explain why..
    15·1 answer
  • DE QUE MANERA LA ALEGRIA NOS AYUDA A CONSEGIR AMIGOS <br> ≤→ω←≥
    10·1 answer
  • Which of these are an ethical issue
    14·1 answer
  • 6.03 Discussion: Then &amp; Now - Safety
    9·1 answer
  • Most equipment is cooled by bringing cold air in the front and ducting the heat out of the back. What is the term for where the
    9·1 answer
  • The web page you created displays the time in the correct time zone for the user's location.
    14·1 answer
  • If an internally piloted DCV does not shift, you should use a gauge to _____. A.check the pilot line pressure b. check the inlet
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!