However, the output is incorrect. What is the likely error?
medium
A. No error; output is correct
B. Incorrect operator precedence causing wrong calculation
C. Division by zero error
D. Variables are not defined
Solution
Step 1: Check variable definitions
Both energy_before and energy_recovered are defined with valid numbers.
Step 2: Verify calculation correctness
Division and multiplication follow correct precedence; calculation is (90 / 120) * 100 = 75.
Final Answer:
No error; output is correct -> Option A
Quick Check:
Calculation is correct, no syntax or logic error [OK]
Hint: Check variable definitions and operator precedence carefully [OK]
Common Mistakes:
Assuming division by zero without checking values
Misreading operator precedence
Thinking variables are undefined
5. A hybrid vehicle uses regenerative braking to recover 20% of its kinetic energy during deceleration. If the vehicle initially has 5000 J of kinetic energy, how much energy is recovered and stored?
hard
A. 1000 J
B. 2500 J
C. 4000 J
D. 500 J
Solution
Step 1: Identify given values
Initial kinetic energy = 5000 J, recovery rate = 20%.
Step 2: Calculate recovered energy
Recovered energy = 20% of 5000 J = 0.20 * 5000 = 1000 J.
Final Answer:
1000 J -> Option A
Quick Check:
20% of 5000 = 1000 J [OK]
Hint: Multiply total energy by recovery percentage [OK]
Common Mistakes:
Using 20 instead of 0.20 for percentage
Calculating remaining energy instead of recovered
Mixing units or values
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.