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 81 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
Gracias!


kusterl

  • Member
  • Posts: 315
Reply 3 on: Yesterday
Excellent

 

Did you know?

Human kidneys will clean about 1 million gallons of blood in an average lifetime.

Did you know?

In 2006, a generic antinausea drug named ondansetron was approved. It is used to stop nausea and vomiting associated with surgery, chemotherapy, and radiation therapy.

Did you know?

Asthma attacks and symptoms usually get started by specific triggers (such as viruses, allergies, gases, and air particles). You should talk to your doctor about these triggers and find ways to avoid or get rid of them.

Did you know?

Many of the drugs used by neuroscientists are derived from toxic plants and venomous animals (such as snakes, spiders, snails, and puffer fish).

Did you know?

About 600,000 particles of skin are shed every hour by each human. If you live to age 70 years, you have shed 105 pounds of dead skin.

For a complete list of videos, visit our video library