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 80 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 :)


Perkypinki

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

 

Did you know?

Aspirin may benefit 11 different cancers, including those of the colon, pancreas, lungs, prostate, breasts, and leukemia.

Did you know?

Blastomycosis is often misdiagnosed, resulting in tragic outcomes. It is caused by a fungus living in moist soil, in wooded areas of the United States and Canada. If inhaled, the fungus can cause mild breathing problems that may worsen and cause serious illness and even death.

Did you know?

Intradermal injections are somewhat difficult to correctly administer because the skin layers are so thin that it is easy to accidentally punch through to the deeper subcutaneous layer.

Did you know?

IgA antibodies protect body surfaces exposed to outside foreign substances. IgG antibodies are found in all body fluids. IgM antibodies are the first type of antibody made in response to an infection. IgE antibody levels are often high in people with allergies. IgD antibodies are found in tissues lining the abdomen and chest.

Did you know?

All patients with hyperparathyroidism will develop osteoporosis. The parathyroid glands maintain blood calcium within the normal range. All patients with this disease will continue to lose calcium from their bones every day, and there is no way to prevent the development of osteoporosis as a result.

For a complete list of videos, visit our video library