98-382 Exam QuestionsBrowse all questions from this exam

98-382 Exam - Question 22


HOTSPOT -

Your instructor has asked you to write a program that uses simple rules to help determine if a person should take the train, drive their car, or ride a bike, depending on the conditions of the weather and the amount of gas in the car's tank.

The program has the following requirements:

✑ When the temperature is above 65 degrees and it is not raining, the person should be told to ride their bike.

✑ When it is raining, the person should be told to drive their car.

If their car has half a tank of gas or less, they should be told to take the train.

How should you complete the code? To answer, select the appropriate code segments in the answer area.

Hot Area:

Show Answer
Correct Answer:

References: https://www.w3schools.com/jsref/jsref_operators.asp

Discussion

1 comment
Sign in to comment
kisskeo
Oct 28, 2021

Answer - Correct