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
andrew11 [14]
3 years ago
5

If the price of the car is less than or equal to your available cash, display "no". If the price of the car is more than your av

ailable, cash, display "yes".
Engineering
1 answer:
Ede4ka [16]3 years ago
7 0

Answer:

function decision(car_price, available_cash) {

   if(car_price <= available_cash) {

   console.log("no");

   }

   else  {

   console.log("yes");

   }

   }

decision(car_price, available_cash); or decision(available_cash, car_price);

Explanation:

using functions in Javascript:

functions; this refers to dividing codes into reusable parts.

e.g function function_name() {

console.log("How are you?");

}

you can call or invoke this function by using its name followed by parenthesis, like this: function_name(). each time the function is called it will   print out "How are you?".

Parameters: these are variables that act as placeholders for the values that are to be input into a function when it is called

Arguments: The actual values that input or passed into a function when it is called.

e.g

function function_name(parameter1, parameter2) {

console.log(parameter1, parameter2);

}

then we call function_name: function_name("please", "leave"):we have passed two arguments, "please"  and "leave". Inside the function parameter1 equals "please" while parameter2 equals "leave".

Hence, from the question given the two parameters "car_price" and "available_cash" respectively, we write the function with name function_name:

function decision(car_price, available_cash) {

   if(car_price <= available_cash) {

   console.log("no");

   }

   else  {

   console.log("yes");

   }

   }

decision(car_price, available_cash); or decision(available_cash, car_price);

You might be interested in
Which one of the following faults cause the coffee in a brewer to keep boiling after the brewing cycle is finished?
MrRa [10]

Answer:

  C.  Welded contacts on the thermostat

Explanation:

Any fault that keeps the heating element heating when it should not is a fault that will cause the symptom described. The details <em>depend on the design of the brewer</em> (not given).

"A short at the terminals" depends on what terminals are being referenced. The device on-off switch terminals are normally connected together when the brewer is turned on, so a short there may not be observable.

"Welded contacts on the thermostat" will have the observed effect if the thermostat is the primary means of ending the brewing cycle. If the thermostat of interest is an overheat protective device not normally involved in ending the brewing cycle, then that fault may not cause the observed symptom.

__

If the heating element is open-circuit, no heating will occur. A gasket leak may cause a puddle, but may have nothing to do with the end of the brewing cycle. (Loss of water can be expected to end boiling, rather than prolong it.)

8 0
4 years ago
What would happen to a plane if the weight force becomes greater than the lift force?
mrs_skeptik [129]

Answer:

When the lift is greater than the weight, the aircraft gains altitude. ... Drag must be overcome for the aircraft to move, and movement is essential to obtain lift. To overcome drag and move the aircraft forward, another force is essential. This force is thrust.

Explanation:

Hope this helps!

8 0
3 years ago
Read 2 more answers
Gray cast iron, with an ultimate tensile strength of 31 ksi and an ultimate compressive strength of 109 ksi, has the following s
suter [353]

Using an appropriate failure theory, find the factor of safety in each case. State the name of the theory that you are using the theory is max stress theory.

<h3>Wat is the max stress theory?</h3>

The most shear strain concept states that the failure or yielding of a ductile fabric will arise whilst the most shear strain of the fabric equals or exceeds the shear strain fee at yield factor withinside the uniaxial tensile test.”

Stress states at various critical locations are f= 2.662.

Read more about strain:

brainly.com/question/6390757

#SPJ1

3 0
2 years ago
3. A 4-m × 5-m × 7-m room is heated by the radiator of a steam-heating system. The steam radiator transfers heat at a rate of 10
Natali [406]

Answer:

14.52 minutes

<u>OR</u>

14 minutes and 31 seconds

Explanation:

Let's first start by mentioning the specific heat of air at constant volume. We consider constant volume and NOT constant pressure because the volume of the room remains constant while pressure may vary.

Specific heat at constant volume at 27°C = 0.718 kJ/kg*K

Initial temperature of room (in kelvin) = 283.15 K

Final temperature (required) of room = 293.15 K

Mass of air in room= volume * density= (4 * 5 * 7) * (1.204 kg/m3) = 168.56kg

Heat required at constant volume: 0.718 * (change in temp) * (mass of air)

Heat required = 0.718 * (293.15 - 283.15) * (168.56) = 1,210.26 kJ

Time taken for temperature rise: heat required / (rate of heat change)

Where rate of heat change = 10000 - 5000 = 5000 kJ/hr

Time taken = 1210.26 / 5000 = 0.24205 hours

Converted to minutes = 0.24205 * 60 = 14.52 minutes

4 0
4 years ago
Who will win the Copa America 2021 and Euros 2021?
Bess [88]
Brazil will win copa America
4 0
3 years ago
Other questions:
  • What's mutual inductance​
    8·1 answer
  • 12. Dies are turned using a special tool called a/an
    10·1 answer
  • Why Your first project as the new web designer at Smart Design is to increase web traffic to help boost web orders. Before you b
    6·1 answer
  • The heat transfer rate per unit area in a thermal circuit is equivalent to what quantity in an electric circuit? A. voltage B. c
    6·1 answer
  • Before accurate distance standards, a cubit was the length of whose forearm?
    5·1 answer
  • A 1200-kg car moving at 20 km/h is accelerated
    5·1 answer
  • Describe the algorithm you use for looking up a person’s telephone number in the phone book. The input is person’s name; the out
    9·2 answers
  • CAN SOMEONE GIVE ME AND ANSWER AND EXPLANTION FOR ALL THESE QUESTIONS PLEASE, I AM STRUGGLING
    15·1 answer
  • ASAP correct answer plss When you are driving, if you see this traffic sign it means
    8·1 answer
  • Deviations from the engineering drawing cannot be made without the approval of the
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!