This topic contains a solution. Click here to go to the answer

Author Question: What does the following statement do? Math.floor( Math.random() 12 ); a) This creates a random ... (Read 101 times)

tiffannnnyyyyyy

  • Hero Member
  • *****
  • Posts: 512
What does the following statement do? Math.floor( Math.random()  12 );
 
  a) This creates a random number from 0 up to and including 12.
  b) This creates a random number from 0 up to but not including 12.
  c) This creates a random number from 1 up to and including 12.
  d) This creates a random number from 1 up to but not including 12.

Question 2

The value a in the following statement is called the ________ and the value b is called the ________. face = Math.floor( a + Math.random()  b );
 
  a) scaling factor, shifting value
  b) shifting value, scaling factor
  c) scaling value, shifting factor
  d) shifting factor, scaling value



Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by a Subject Expert

robbielu01

  • Sr. Member
  • ****
  • Posts: 336
Answer to Question 1

Ans: (b)

Answer to Question 2

Ans: (b)




tiffannnnyyyyyy

  • Member
  • Posts: 512
Reply 2 on: Jul 7, 2018
YES! Correct, THANKS for helping me on my review


pangili4

  • Member
  • Posts: 346
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

In 1835 it was discovered that a disease of silkworms known as muscardine could be transferred from one silkworm to another, and was caused by a fungus.

Did you know?

Dogs have been used in studies to detect various cancers in human subjects. They have been trained to sniff breath samples from humans that were collected by having them breathe into special tubes. These people included 55 lung cancer patients, 31 breast cancer patients, and 83 cancer-free patients. The dogs detected 54 of the 55 lung cancer patients as having cancer, detected 28 of the 31 breast cancer patients, and gave only three false-positive results (detecting cancer in people who didn't have it).

Did you know?

If you could remove all of your skin, it would weigh up to 5 pounds.

Did you know?

A headache when you wake up in the morning is indicative of sinusitis. Other symptoms of sinusitis can include fever, weakness, tiredness, a cough that may be more severe at night, and a runny nose or nasal congestion.

Did you know?

As many as 28% of hospitalized patients requiring mechanical ventilators to help them breathe (for more than 48 hours) will develop ventilator-associated pneumonia. Current therapy involves intravenous antibiotics, but new antibiotics that can be inhaled (and more directly treat the infection) are being developed.

For a complete list of videos, visit our video library