For the "dog" part of the code, it works perfectly and does what it's supposed to. However, if you enter "Cat" for the input question at the start, it still goes on and does the dog portion of the code.
Even though I've wrote in the code that if the answer from the question=="Cat"or"cat" then it should do this section not the Dog section.
import time
import sys
animal=input("What animal do you want to calculate the age of? - Possible choices: Cat/Dog")
if animal=="Dog"or"dog":
age=int(input("How old is your Dog?"))
if age==1:
print("Calculating the age of the Dog...")
time.sleep(1)
print("The age of the animal is: 11")
elif age==2:
print("Calculating the age of the Dog...")
time.sleep(1)
print("The age of the animal is: 11")
else:
age=age-2
print("Calculating the age of the Dog...")
time.sleep(1)
agecalculation=age*4+22
print("The age of the animal is:",agecalculation)
time.sleep(2)
print("End of program.")
time.sleep(2)
sys.exit()
elif animal=="Cat"or"cat":
age=int(input("How old is your Cat?"))
if age==1:
print("Calculating the age of the Cat...")
time.sleep(1)
print("The age of the animal is: 15")
elif age==2:
print("Calculating the age of the Cat...")
time.sleep(1)
print("The age of the animal is: 25")
else:
age=age-2
print("Calculating the age of the Cat...")
time.sleep(1)
agecalculation=age*4+25
print("The age of the animal is:",agecalculation)
time.sleep(2)
print("End of program.")
time.sleep(2)
sys.exit()
else:
print("That is not an animal, or isn't on the list specified")
animal=input("What animal do you want to calculate the age of? - Possible choices: Cat/Dog")