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 92 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
Thanks for the timely response, appreciate it


amandalm

  • Member
  • Posts: 306
Reply 3 on: Yesterday
Gracias!

 

Did you know?

Less than one of every three adults with high LDL cholesterol has the condition under control. Only 48.1% with the condition are being treated for it.

Did you know?

The FDA recognizes 118 routes of administration.

Did you know?

Adolescents often feel clumsy during puberty because during this time of development, their hands and feet grow faster than their arms and legs do. The body is therefore out of proportion. One out of five adolescents actually experiences growing pains during this period.

Did you know?

Aspirin is the most widely used drug in the world. It has even been recognized as such by the Guinness Book of World Records.

Did you know?

Throughout history, plants containing cardiac steroids have been used as heart drugs and as poisons (e.g., in arrows used in combat), emetics, and diuretics.

For a complete list of videos, visit our video library