The console application that requests the user to enter the name of their Pet and the year their pet was born and calculate its age is as follows:
from datetime import date
def nameAndAge(x, y):
today = date.today()
age = today.year - y.year - ((today.month, today.day) < (y.month, y.day))
return f"The name of your pet is {x} and the age is {age}"
# Driver code
print(nameAndAge("mike", date(1997, 2, 3)), "years")
The code is written in python.
learn more on python here: https://brainly.com/question/25285677