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 82 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
Great answer, keep it coming :)


bblaney

  • Member
  • Posts: 323
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

No drugs are available to relieve parathyroid disease. Parathyroid disease is caused by a parathyroid tumor, and it needs to be removed by surgery.

Did you know?

Children of people with alcoholism are more inclined to drink alcohol or use hard drugs. In fact, they are 400 times more likely to use hard drugs than those who do not have a family history of alcohol addiction.

Did you know?

Malaria mortality rates are falling. Increased malaria prevention and control measures have greatly improved these rates. Since 2000, malaria mortality rates have fallen globally by 60% among all age groups, and by 65% among children under age 5.

Did you know?

In Eastern Europe and Russia, interferon is administered intranasally in varied doses for the common cold and influenza. It is claimed that this treatment can lower the risk of infection by as much as 60–70%.

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).

For a complete list of videos, visit our video library