Question

In: Computer Science

CIS- Python Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years...

CIS- Python

Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guzzler line from model years 2004-2007. Given variables modelYear and modelName write a statement that assigns True to recalled if the values of modelYear and modelName match the recall details and assigns False otherwise.

Solutions

Expert Solution

Python code:

#assigning sample value to modelYear
modelYear=2005
#assigning sample value to modelName
modelName="Guzzler"
#assigning recalled as False
recalled=False
#checking if modelName is Extravagant and modelYear is from 1999-2002
if(modelName=="Extravagant" and modelYear>=1999 and modelYear<=2002):
#setting recalled to True
recalled=True
#checking if modelName is Guzzler and modelYear is from 2004-2007
elif(modelName=="Guzzler" and modelYear>=2004 and modelYear<=2007):
#setting recalled to True
recalled=True
#printing the value of recalled
print(recalled)


Screenshot:


Output:


Related Solutions

Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as...
Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guzzler line from model years 2004-2007. Given an int variable modelYear and an array of chars representing a string modelName write a statement that prints the message "RECALL" to standard output if the values of modelYear and modelName match the recall details.
Rogers, Inc., is considering replacing its existing assembly line with a new upgraded model. The CEO...
Rogers, Inc., is considering replacing its existing assembly line with a new upgraded model. The CEO of thecompany, John Rogers, makes $150,000 a year and is in the personal 35% marginal income tax bracket. Aconsulting company in Mr. Rogers’ neighborhood provided the following information about the economiceffects of the replacement:The cost of the upgraded assembly line is estimated to be $500,000 plus installation costs of $50,000.The technology on the upgraded model is more sophisticated than what is on the current...
A local Division of Motor Vehicles (DMV) is concerned with its waiting line system. Currently, the...
A local Division of Motor Vehicles (DMV) is concerned with its waiting line system. Currently, the DMV uses a single-server, single-line, single-phase system when processing license renewals. Based on historical evidence, the average number of customers arriving per hour is 9 and is described by a Poisson distribution. The service rate is 12 customers per hour with the service times following an exponential distribution. The customers are patient and come from an infinite population. The manager of the DMV would...
7. A company that manufactures brakes for cars has just released a line of all-terrain vehicles....
7. A company that manufactures brakes for cars has just released a line of all-terrain vehicles. Using the same research and findings from the development of the ATV brakes, the manufacturer is redesigning its car brakes. By sharing the research across the business units for both vehicles, the company is increasing company profitability through: a.economies of scope. b. commonalities. c. product bundling. d. restructuring. 8. To pursue a diversification strategy, managers must have the ability to: a.outsell all of the...
Southwestern Company needs 1,000 motors in its manufacture of automobiles. It can buy the motors from...
Southwestern Company needs 1,000 motors in its manufacture of automobiles. It can buy the motors from Jinx Motors for $1,250 each. Southwestern's plant can manufacture the motors for the following costs per unit: Direct materials $ 500 Direct manufacturing labor 250 Variable manufacturing overhead 200 Fixed manufacturing overhead     350 Total $1,300 If Southwestern buys the motors from Jinx, 70% of the fixed manufacturing overhead will not be avoided. Should the company make or buy the motors? a) buy and...
Mead Motors purchases an automobile for its new car inventory from Generous Motors, which finances this...
Mead Motors purchases an automobile for its new car inventory from Generous Motors, which finances this transaction through its financial subsidary, Generour Motors Credit COmpany. Mead pays no funds to Generous Motors or GMCC untio it sells the automobile. Mead must then repay the balance of the loan plus interest to GMCC. How should Mead report the acquistion and repayment transcations in its Statemednt of Cash Flows? Briefy restate the facts of the case. Identify the issue. State the issue...
Acme Outdoors Co. is introducing a new line of sport all-terrain vehicles (ATVs). Acme is considering...
Acme Outdoors Co. is introducing a new line of sport all-terrain vehicles (ATVs). Acme is considering program proposals from two competing companies: A & B. A's marketing plan is expected to generate high sales with a 75% probability and only a 25% likelihood of low sales. An alternative marketing plan from company B could result in an initial 60% likelihood of high ATV sales and 40% probability of low sales. But company B's offer also contains a provision for an...
Kuantan ATV, Inc. assembles five different models of all-terrain vehicles (ATVs) from various ready-made components to...
Kuantan ATV, Inc. assembles five different models of all-terrain vehicles (ATVs) from various ready-made components to serve the Las Vegas, Nevada, market. The company uses the same engine for all its ATVs. The purchasing manager, Ms. Jane Kim, needs to choose a supplier for engines for the coming year. Due to the size of the warehouse and other administrative restrictions, she must order the engines in lot sizes of 1,000 each. The unique characteristics of the standardized engine require special...
In its Fuel Economy Guide for 2014 model vehicles, the Environmental Protection Agency gives data on...
In its Fuel Economy Guide for 2014 model vehicles, the Environmental Protection Agency gives data on 1134 vehicles. The combined city and highway gas mileage of these 1134 vehicles is approximately Normal with mean 22.2 miles per gallon (mpg) and standard deviation 5.2 mpg. (a) The 2014 Volkswagen Beetle with a four-cylinder 1.8 L engine and automatic transmission has combined gas milage of 28 mpg. What percent of all vehicles have better gas mileage than the Beetle? (b) How high...
In its Fuel Economy Guide for 2008 model vehicles, the Environmental Protection Agency gives data on...
In its Fuel Economy Guide for 2008 model vehicles, the Environmental Protection Agency gives data on 1152 vehicles. There are a number of outliers, mainly vehicles with very poor gas mileage. If we ignore the outliers, however, the combined city and highway gas mileage of the other 1120 or so vehicles is approximately Normal with mean 18.7 miles per gallon (mpg) and standard deviation 4.3 mpg. The 2008 Chevrolet Malibu with a four-cylinder engine has combined gas mileage 25 mpg....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT