Question 1 of 10
A greenhouse sensor reports -7 degrees relative to target. What value does adj hold?
int adj = Math.abs(-7);
- A. -7
- B. 7.0
- C. 7
- D. 0
A greenhouse sensor reports -7 degrees relative to target. What value does adj hold?
int adj = Math.abs(-7);
A square tray has area 36. What value does edge hold?
double edge = Math.sqrt(36);
What value does volume hold?
double volume = Math.pow(3, 2);
What value does clipped hold?
int clipped = (int) Math.pow(2, 3);
A rain simulation uses Math.random() with no scaling. Which statement is true?
Which integers can (int)(Math.random() * 1) produce?
A tray ID must be an int from 18 through 22 inclusive. Which expression is correct?
A supplied Math.random() value is 0.25. What value does slot hold?
int slot = (int) (0.25 * 8);
Which expression produces a double in [0.0, 8.0) with no added shift?
What value does mix hold?
double mix = Math.pow(2, 3) - Math.sqrt(9);