1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vlad [161]
3 years ago
15

Clunker Motors Inc. is recalling all vehicles in its Extravagant line from model years 1999-2002 as well all vehicles in its Guz

zler line from model years 2004-2007. A boolean variable named recalled has been declared. Given a variable modelYear and a String modelName write a statement that assigns true to recalled if the values of modelYear and modelName match the recall details and assigns false otherwise. Do not use an if statement in this exercise!
Computers and Technology
1 answer:
Soloha48 [4]3 years ago
3 0

Answer:

boolean recalled;

((modelYear>=1999 && modelYear<=2002 && modelName=="Extravagant") || (modelYear>=2004 && modelYear<=2007 && modelName=="Guzzler")) ? recalled = true : recalled =false

Explanation:

Using a combination of comparison operators and logical operators, the conditions stated in the question is captured in the code snippet with the boolean variable recalled also declared. Since we are not allowed to use the if statement, we have used the conditional or ternary operator that checks if a condition is true executes the statment that follows the question mark else it executes the statement after the full colon.

You might be interested in
Which type of software-generated problems can indicate that a software bug is causing a memory error?
Katena32 [7]
The type of software-generated problems that can indicate that a software bug is causing a memory error are page fault, exception error and general-protection fault. Registry errors show that there are parts of the registry that were written to the faulty parts of the RAM. An erroneous memory count would happen when there is incompatibility in the installation.
3 0
3 years ago
The following equations estimate the calories burned when exercising (source): Men: Calories = ( (Age x 0.2017) — (Weight x 0.09
sammy [17]

In python:

age = float(input("How old are you? "))

weight = float(input("How much do you weigh? "))

heart_rate = float(input("What's your heart rate? "))

time = float(input("What's the time? "))

print("The calories burned for men is {}, and the calories burned for women is {}.".format(

   ((age * 0.2017) - (weight * 0.09036) + (heart_rate * 0.6309) - 55.0969) * (time / 4.184),

   ((age * 0.074) - (weight * 0.05741) + (heart_rate * 0.4472) - 20.4022) * (time / 4.184)))

This is the program.

When you enter 49 155 148 60, the output is:

The calories burned for men is 489.77724665391963, and the calories burned for women is 580.939531548757.

Round to whatever you desire.

6 0
3 years ago
? Create a home page that introduces the rental car company. the page should have a header and footer. in the document body, it
Anestetic [448]
You need some more criteria. Is this a webpage? If so.. What language(s) are applicable for writing your web application. My profession is systems development, do I do a lot of fronte-end/ back-end development. I don't mind helping, just need some more information. If not what resource does this need to be created in?
7 0
3 years ago
A pointing device controls the movement of the ____.
andrey2020 [161]
<span>A pointing device controls the movement of the </span>Mouse Pointer
3 0
3 years ago
Two of the people most often credited with the invention of the Internet and WWW respectively are _____.
krek1111 [17]
Bob Kahn and Vint Cerf were both pioneers of the Internet, and Tim Berners-Lee was known for inventing the WWW.
7 0
3 years ago
Other questions:
  • What type of electronic monitoring involves an offender being contacted periodically by telephone or beeper to verify his or her
    5·1 answer
  • An iframe is an inline table for a website. True False i need an answer fast
    15·1 answer
  • The code int *p; declares p to be a(n) ____ variable. new
    8·1 answer
  • Which of the following statements are true?
    14·1 answer
  • After which stage in the information processing cycle can data be referred for future use?
    7·1 answer
  • Why when i click home on iphone i still at my grandma house
    11·2 answers
  • Which procedure is recommended when cleaning inside a computer? Clean the hard drive heads with a cotton swab. Hold the CPU fan
    9·1 answer
  • Super computer in nuclear energy ​
    13·1 answer
  • Prokaryotes are __________________ and include ________________________.
    8·1 answer
  • 10.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!