Fixed Formulas

EasyAcc. 93.7%
+20 XP 8

Unchanging Rules

Some rules in nature or business never change, like gravity or conversion rates. In programming, we declare these fixed values using const so they cannot be altered accidentally by other code.

The Assignment

Your task is to find the object's weight on Earth using the mass provided.

  1. Declare a const variable named G and set it safely to 9.8.
  2. Multiply mass by G to find the weight.
  3. Return the calculated weight.

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...
5 Hidden

Input Arguments

mass10

Expected Output

98

Click RUN to test your solution