0

Fitness Goals! Exercise in Introduction to Python Test failure

when I tried to solve the exercise, Testing failed in test case 3, and I didn't know what was wrong. ------------------------------------------------------------------------------------------------------------- Exercise Description: A user is considered to have achieved the daily fitness goal when the number of steps is greater than 10000 or the number of active minutes is greater than 30. Task: Complete the code to output True if the user has achieved the daily fitness goal, and False otherwise. --------------------------------------------------------------------------------------------------------------- My code: # Take steps and minutes as inputs steps = int(input()) active_minutes = int(input()) # Store the result of the operations in the variable goal_achieved = steps > 1000 or active_minutes > 30 # Display the result on the screen print(goal_achieved) ------------------------------------------------------------------- Test Case 3 Result: Input 7600 28 Your Output True Expected Output False

13th Jul 2023, 8:25 AM
Islam Othman
Islam Othman - avatar
2 Antworten
+ 5
In your code you have steps > 1000, instead of 10000?
13th Jul 2023, 9:32 AM
Lisa
Lisa - avatar
+ 1
Thanx Lisa. you are right, the bug is that I miss one zero in the steps count.
13th Jul 2023, 11:12 AM
Islam Othman
Islam Othman - avatar