Answer:
Following are the program in the Python Programming Language.
#set user defined integer variable
modelYear=int(input("Enter year from 1999 to 2002 or from 2004 to 2007: "))
#set user defined string variable
modelName=input("Enter the vehicle name 'Extravagant' or 'Guzzler': ")
#set if statement
if((modelYear>=1999 and modelYear<=2002 and modelName=="Extravagant") or (modelYear>=2004 and modelYear<=2007 and modelName=="Guzzler")):
recalled=True #if the statement is true
else:
recalled=False #if the statement is not true
print(recalled) #print boolean type
Output:
Enter year from 1999 to 2002 or from 2004 to 2007: 2001
Enter the vehicle name 'Extravagant' or 'Guzzler': Extravagant
True
Step-by-step explanation:
Here, we set a user defined integer data type variable "modelYear" and assign value from the user then, we set a user defined string data type variable "modelName" and assign value from the user.
Then, we set the if statement and pass the condition when modelYear is greater than equal to 1999 and less than equal to 2002 and modelName is equal to "Extravagant" or modelYear is greater than equal to 2004 and less than equal to 2007 and modelName is equal to "Guzzler" than "recalled" is equal to True otherwise "recalled" is equal to False.
Finally, we print the value of the variable "recalled".