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
A student is building a circuit which material should she use for the wires and why?
Nataliya [291]

Answer:

i think it is D tell me if its wrong

Explanation:

6 0
3 years ago
Read 2 more answers
The following median grain size data were obtained during isothermal liquid phase sintering of an 82W-8Mo-8Ni-2Fe alloy. What is
Morgarella [4.7K]

Answer:

The probable grain-coarsening mechanism is : Ideal grain growth mechanism

( d^{2}- d_{0} ^{2} = kt )

Explanation:

The plot attached below shows the time dependence of the growth of grain.

The probable grain-coarsening mechanism is : Ideal grain growth mechanism

the ideal growth follows this principle = d^{2} - d^{2} _{0}  = kt

d = final grain size

d_{0} = initial grain size

k = constant ( temperature dependent )

t = 0

8 0
3 years ago
One kg of an idea gas is contained in one side of a well-insulated vessel at 800 kPa. The other side of the vessel is under vacu
laiz [17]

Answer:

Option C = internal energy stays the same.

Explanation:

The internal energy will remain the same or unchanged because this question has to do with a concept in physics or classical chemistry (in thermodynamics) known as Free expansion.

So, the internal energy will be equals to the multiplication of the change in temperature, the heat capacity (keeping volume constant) and the number of moles. And in free expansion the internal energy is ZERO/UNCHANGED.

Where, the internal energy, ∆U = 0 =quantity of heat, q - work,w.

The amount of heat,q = Work,w.

In the concept of free expansion the only thing that changes is the volume.

7 0
3 years ago
An 800-kg drag racer accelerates from rest to 390 km/hr in 5.8 s. What is the net impulse applied to the racer in the first 5.8
marissa [1.9K]

Answer:

Impulse =14937.9 N

tangential force =14937.9 N

Explanation:

Given that

Mass of car m= 800 kg

initial velocity u=0

Final velocity v=390 km/hr

Final velocity v=108.3 m/s

So change in linear momentum P= m x v

           P= 800 x 108.3

 P=86640 kg.m/s

We know that impulse force F= P/t

So F= 86640/5.8 N

F=14937.9 N

Impulse force F= 14937.9 N

We know that

v=u + at

108.3 = 0 + a x 5.8

a=18.66\ m/s^2

So tangential force F= m x a

F=18.66 x 800

F=14937.9 N

6 0
3 years ago
A converging-diverging nozzle has an area ratio of 5.9. (1) Determine the (P0/Pt) values corresponding to the 1st, 2nd, and 3rd
nata0808 [166]

Answer:

Check the explanation

Explanation:

The Total pressure is the overall of fixed or static pressure p, the dynamic pressure q, as well as gravitational head. Total pressure can also be referred to as the measure of the overall energy of the airstream, and is the same to static pressure plus velocity pressure.

kindly check the step by step solution in the attached image below to Determine the (P0/Pt) values corresponding to the 1st, 2nd, and 3rd critical points.

5 0
3 years ago
Other questions:
  • For a heat pump, COP<1. a) True b) False
    11·1 answer
  • A turbine produces shaft power from a gas that enters the turbine with a (static) temperature of 628 K, a velocity of 143 m/s an
    7·1 answer
  • A stainless-steel specimen from the same material characterized up above, was formed into a rectangular cross-section of dimensi
    9·1 answer
  • If the resistance reading on a DMM'S meter face is to 22.5 ohms in the range selector switch is set to R X 100 range, what is th
    5·1 answer
  • What considerations are included in the Preliminary Floodproofing/Retrofitting Preference Matrix?
    7·1 answer
  • 1. The area of the given triangle is 25 square units. What is the value of x?<br> X+2
    8·1 answer
  • At the inlet to the combustor of a supersonic combustion ramjet (or scramjet), the flow Mach number is supersonic. For a fuel-ai
    12·1 answer
  • The line touching the circle at a point ....................... is known as ........................... .
    12·1 answer
  • The toughness of a material does what, when it's been heated?​
    7·1 answer
  • PLEASE HELP AND ANSWER MY OTHER QUESTIONS!,
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!