+ 1

Fix the bug

# Take steps and minutes as inputs steps = int(input()) active_minutes = int(input()) # Store the result of the operations in the variable goal_achieved = False if (steps <10000) or (active_minutes < 30): goal_achieved = True # Display the result on the screen print(goal_achieved ) Please find the bug the false is not working

5th Jan 2024, 4:17 PM
Ayomide
Ayomide - avatar
18 odpowiedzi
+ 3
The task cannot be solved without knowing the precise task instructions. When you ask a question, describe exactly what the task is. Read carefully: The goal is achieved when the user has MORE than 10000 steps or MORE than 30 min of activity. And as a side note: The part between if...: already is a boolean – you can write the code without the if statement.
5th Jan 2024, 4:42 PM
Lisa
Lisa - avatar
+ 3
When you ask for help, read carefully what answers you get: The goal is achieved when the user has ⭐️MORE⭐️ than 10000 steps or ⭐️MORE⭐️ than 30 min of activity. Pay attention to the ⭐️ and fix you code accordingly.
5th Jan 2024, 6:03 PM
Lisa
Lisa - avatar
+ 1
Show what you have tried, not your old code.
5th Jan 2024, 5:00 PM
Lisa
Lisa - avatar
+ 1
Okay, I checked the post. Look at this: The goal is achieved when the user has ⭐️MORE than 10000 steps or ⭐️MORE than 30 min of activity. < means smaller than > means greater than
5th Jan 2024, 5:14 PM
Lisa
Lisa - avatar
0
I have tried that it's not working and that not my issue with the code if the goal is not achieved there is supposed to be a output of False but it's not working
5th Jan 2024, 4:53 PM
Ayomide
Ayomide - avatar
0
That what I have tried Please go check out my post on my profile I will post a screenshot of everything there please
5th Jan 2024, 5:10 PM
Ayomide
Ayomide - avatar
0
Thanks have posted it
5th Jan 2024, 5:15 PM
Ayomide
Ayomide - avatar
0
So you fixed what I have pointed out in my last comment?
5th Jan 2024, 5:19 PM
Lisa
Lisa - avatar
0
No I have not please go Check my post you will see what am saying
5th Jan 2024, 5:26 PM
Ayomide
Ayomide - avatar
0
Thanks I been able to solve it
5th Jan 2024, 6:19 PM
Ayomide
Ayomide - avatar
0
The else statement is missing
6th Jan 2024, 5:42 PM
Rwitoban Das
Rwitoban Das - avatar
0
# Take steps and minutes as inputs steps = int(input()) active_minutes = int(input()) # Store the result of the operations in the variable goal_achhieved = False if (steps >=10000 or active_minutes >= 30): goal_achieved = True # Display the result on the screen print(goal_achieved )
6th Jan 2024, 5:44 PM
Abhijeevan V R
Abhijeevan V R - avatar
0
The code should be as follows: Steps = int(input()) Active_minutes = int(input()) If (Steps>10000) or (Active_minutes>30): goal_achieved = true print(goal_achieved) else: goal_achieved = false print(goal_achieved)
6th Jan 2024, 5:47 PM
Rwitoban Das
Rwitoban Das - avatar
0
1. PLEASE READ THE PREVIOUS REPLIES BEFORE POSTING 2. It already has been solved 3. The else is not necessary
6th Jan 2024, 5:52 PM
Lisa
Lisa - avatar
0
Welp ok
6th Jan 2024, 5:52 PM
Rwitoban Das
Rwitoban Das - avatar
0
Rwitoban Das : your code was wrong. You used If insted of if. Python is case sensitive
6th Jan 2024, 5:53 PM
Abhijeevan V R
Abhijeevan V R - avatar
0
Yes sorry here in the comments it doesnt automatically bring it to smallcase as in the coding workspace, new to this platform... still learning
6th Jan 2024, 5:54 PM
Rwitoban Das
Rwitoban Das - avatar
0
Rwitoban Das me too brother. happy learning
6th Jan 2024, 6:09 PM
Abhijeevan V R
Abhijeevan V R - avatar