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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:50, laurentsofia09
Assume that you have an sorted array of records. assume that the length of the array (n) is known. give two different methods to search for a specific value in this array. you can use english or pseudo-code for your algorithm. what is the time complexity for each algorithm and why?
Answers: 1
image
Computers and Technology, 23.06.2019 03:00, SKYBLUE1015
What are the different parts of computer
Answers: 2
image
Computers and Technology, 23.06.2019 18:00, sophx
Apunishment or the threat of punishment used to enforce conformity. select the best answer from the choices provided t f
Answers: 1
image
Computers and Technology, 24.06.2019 02:00, destinyd10189
Read the following scenario, and then answer the question below. you want to send an e-mail to your boss requesting a meeting to discuss a raise. what is the best example of an e-mail to an employer about this meeting? “hey jason. can we chat about getting me more money soon? let me know. peace, meg.” “hello jason. pardon me for sending yet another e-mail today about my need to talk to you about my position and a possible pay increase. i am dying to know when you can talk. sincerely, meg.” “hello jason. i have been with the company for one year and have taken on more responsibilities than outlined in my job description. i would appreciate an opportunity to speak with you about my position. let me know when we can schedule a meeting. you, meg.” “greetings jason! i hope this e-mail finds you well and happy today. i really, really want to talk to you about something important. i am not sure if you have time. i hope you do. get back in touch with me and let me know when we might talk. ever so much for taking the time to read this. sincerely, meg.”
Answers: 3
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 in other subjects:

Konu
Biology, 24.07.2019 20:00