Using Python
#Python code
AnimalName="dog" AltAnimal="pigeon" if AnimalName is "cat": #check if value of AnimalName is cat print("The animal is a cat.") elif AltAnimal is AnimalName: print("The animal is a %s."%(AltAnimal)) elif AnimalName is "lemur": print("I am displeased with the value of AnimalName.") else: print("The animal is not a cat or %s. Apparently it is a %s."%(AltAnimal,AnimalName))
OUTPUT
Get Answers For Free
Most questions answered within 1 hours.