Question: Having trouble with my code Python3 The output should be like this but I keep getting errors on every elif statement. Input: 4 dog medium

Having trouble with my code Python3

The output should be like this but I keep getting errors on every elif statement.

Input: 4 dog medium

Output:

How old is your pet?

What type of animal is your pet?

What size of dog do you have?

Your Medium Dog is 4 year(s) old.

That is 39 in human years.

When I just make them if statements it runs but it doesn't output what I want.

# Enter solution here age = int(input("How old is your pet?")) type= input(" What type of animal is your pet?") print() if (type == "cat") or (type == "Cat"): print (" Your Cat is",age,"year(s) old.") print("That is",(age*4+15),"in human years.") elif (type == "Dog") or (type == "dog"): size = input("What size of dog do you have?") print() print ("Your dog is",age,"year(s) old.") if (size == "Small") or (size == "small"): print("Your ",size," Dog is ",age,"year(s) old.") print("That is ",(age*4+20)," in human years.") if (size == "Medium") or (size =="medium"): print("Your ",size," Dog is ",age,"year(s) old.") print("That is ",(age*6+15)," in human years.") if (size == "Large") or (size == "large"): print("Your ",size," Dog is ",age,"year(s) old.") print("That is ",(age*9+4)," in human years.")

else : print ("I'm sorry I don't know what a ",type," Dog is.")

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!