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, 24.06.2019 00:40
Use a software program or a graphing utility with matrix capabilities to solve the system of linear equations using an inverse matrix. x1 + 2x2 − x3 + 3x4 − x5 = 6 x1 − 3x2 + x3 + 2x4 − x5 = −6 2x1 + x2 + x3 − 3x4 + x5 = 3 x1 − x2 + 2x3 + x4 − x5 = −3 2x1 + x2 − x3 + 2x4 + x5 = 5
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
Which best describes the condition under which the unicode output is the same as plain text ?
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
Python. primary u.s. interstate highways are numbered 1-99. odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. thus, the 405 services the 5, and the 290 services the 90. given a highway number, indicate whether it is a primary or auxiliary highway. if auxiliary, indicate what primary highway it serves. also indicate if the (primary) highway runs north/south or east/west.
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
What are the 4 basic items that are traded throughout the world?
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
Biology, 24.10.2021 14:50
question
English, 24.10.2021 14:50
question
History, 24.10.2021 14:50
question
Mathematics, 24.10.2021 14:50
Questions on the website: 13722367