subject
Computers and Technology, 30.04.2022 05:20 yair7

I just dont understand, It says no output and that my_dog is not defined. 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()

# TODO: Create generic pet (using pet_name, pet_age) and then call print_info()

# TODO: Create dog pet (using dog_name, dog_age, dog_breed) and then call print_info()

# TODO: Use my_dog. breed to output the breed of the dog

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
Robots with telescoping arms are sometimes used to perform tasks (e.g., welding or placing screws) where access may be difficult for other robotic types. during a test run, a robot arm is programmed to extend according to the relationship r = 3 + 0.5cos(4θ) and the arm rotates according to the relationship θ=−π4t2+πt , where r is in feet, θ is in radians, and t is in seconds. use a computer program to plot the path of tip a in x and y coordinates for 0 ≤ t ≤ 4s.
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create the illusion of 3d in a 2d game
Answers: 3
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
question
Computers and Technology, 23.06.2019 02:30
How to launch an app: steps to be successful? launching an app is a great idea, but it’s not that easy as we supposed to think. the majority of mobile applications don’t generate revenue because companies aren’t ready to be competitive. referring to our experience in successfully building and launching apps we hope to you omit these difficulties. we are going to talk about ideas, marketing, testing your product, its development, distribution and support. you will learn 8 product launch stages to succeed.
Answers: 1
You know the right answer?
I just dont understand, It says no output and that my_dog is not defined. class Pet:
def __i...
Questions
question
Business, 05.04.2021 14:00
question
English, 05.04.2021 14:00
question
Mathematics, 05.04.2021 14:00
Questions on the website: 13722367