Planetary Weight

EasyAcc. 93.7%
+20 XP 8

Gravity Lock

The starship's landing computer needs to calculate the local weight of cargo. Space gravity is constant at 9.8 m/s².

  1. Declare a const variable named G and set it to 9.8.
  2. Calculate weight by multiplying mass by G.
  3. Return the calculated weight as a number.

01EXAMPLE 1

Inputmass = 10
Output98

Explanation: 10 * 9.8 = 98

Constraints

  • Use a const variable for the gravity value.
  • Numerical tolerance is handled by the platform.
FundamentalsMathConstants
JavaScript
Loading...
9 Hidden

Input Arguments

mass10

Expected Output

98

Click RUN to test your solution