Question: I need help fixing my code. IN PYTHON 3. I keep getting an attribute error after a couple inputs. I dont know what i'm doing

I need help fixing my code. IN PYTHON 3. I keep getting an attribute error after a couple inputs. I dont know what i'm doing wrong. the code and output is below.
I need help fixing my code. IN PYTHON 3. I keep getting
an attribute error after a couple inputs. I dont know what i'm
doing wrong. the code and output is below. Current file: main.py Load

Current file: main.py Load default template... 2 # Create your main code here 5. Import pet 7 pet_owner - input("Please enter owner's name:") 3 pet.Pet.pet_owner - pet owner 9 pet list - 10 while True! pet name input("Please enter the pet's nan") if pet_name= "qor pet_name " : break age - int (input("Please enter the pet's age")) pet - pet.Pet(pet_name, age) pet list.append(pet) 17 print("Pet List:) 18 for pet in pet_list print (pet) Current file: pet.py Load default templat 2 # Create your pet class here 3 4 class Pet: pet_owner - "X" 10 def __init_(self, name, age): self.pet_name - name self.pet_age - age def_str__(self): var - "(0) is (1) year(s) old and is owned by (2)". format(self.pet_nane, self.pet_age, Pet.pet_owner) return var 6: Compare output A 0/1 Output differs. See highlights below. Sam I am Good Boi Input Jackson Your output ends with s agePlease enter the pet's namePlease enter the pet's ageTraceback (mos File "main.py", line 15, in pet - pet. Pet (pet_name, age) AttributeError: Pet' object has no attribute 'Pet! Expected output ends with Pet List: Good Boi is 5 year(s) old and is owned by Sam I am Jackson is 7 year(s) old and is owned by Sam I am

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!