0

Fix code

Whats wrong with my code? # Take steps and minutes as inputs steps = int(input()) active_minutes = int(input()) # Store the result of the operations in the variable steps = 10035 active_minutes = 15 goal_achieved = (steps > 10000) or (active_minutes > 35) # Display the result on the screen print (goal_achieved );

20th Jun 2025, 7:19 AM
Vernon Lobeko
Vernon Lobeko - avatar
4 ответов
+ 6
Vernon Lobeko your code is almost correct just remove the semi colon at the last line and your code will work as expected
20th Jun 2025, 12:20 PM
Aysha
+ 6
You are supposed to use the input – not hard-code the values remove lines 3 and 4. Read the task description carefully. It says "more than 30 min", not "more than 35". Next time, mention course name and task name so users can look up the task description.
20th Jun 2025, 12:29 PM
Lisa
Lisa - avatar
+ 4
You put the code in the tags section so nobody can read it. Link your code. Tag the relevant programming language.
20th Jun 2025, 7:55 AM
Lisa
Lisa - avatar
+ 3
You took user input but then ignored it** by reassigning `steps` and `active_minutes` to fixed values. 2. This made the program **always output `True`** (because `10035 > 10000` is always true), regardless of the user's actual input. You should **use the user's input directly** in the condition without overwriting it. # 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 > 10000) or (active_minutes > 35) # Display the result on the screen print(goal_achieved)
21st Jun 2025, 8:21 AM
Nexvoid
Nexvoid - avatar