Answer:
The Python program is shown below.
#initialize user-defined integer variable
modelYear=int(input("Please enter a year between 1999 and 2002 or from 2004 to 2007: "))
#initialize user-defined string variable
modelName=input("Enter the name of the vehicle, either 'Extravagant' or 'Guzzler': ")
#conditional statement
if((modelYear>=1999 and modelYear<=2002 and modelName=="Extravagant") or (modelYear>=2004 and modelYear<=2007 and modelName=="Guzzler")):
recalled=True #if the condition holds true
else:
recalled=False #if the condition is false
print(recalled) #print the boolean value
Output:
Enter year from 1999 to 2002 or from 2004 to 2007: 2001
Enter the vehicle name 'Extravagant' or 'Guzzler': Extravagant
True
Explanation:
In this program, we define an integer variable "modelYear" and assign it a user-provided value, followed by another variable "modelName" to store the vehicle name from the user.
The program then evaluates the specified conditions where modelYear has to be between 1999 and 2002 for "Extravagant" or between 2004 and 2007 for "Guzzler" so that "recalled" will be set to True, otherwise it will be assigned False.
Ultimately, we output the value of "recalled".