+ 1

[Solved] I need help with if statements v in python

When I write the code every single test case works but 4, and test case 4 is hidden, so I have no clue how to fix it. Can anybody tell me why it isnt working? I've looked on google but nothing comes up My code is If(total<=100): Print(money-total) Elif (total>=100): Print()

22nd Oct 2020, 4:22 PM
Serana Zentha
Serana Zentha - avatar
10 Respostas
+ 4
We need description for what you are trying with code.. But According to your specifications : total<=100 works for -infinity to 100. So exclude negative by total>=0 and tital<=100
22nd Oct 2020, 4:55 PM
Jayakrishna 🇼🇳
+ 7
Serana Zentha please delete the question or edit the thread as [solved] . deleting would be better as as there really nothing here to help others with a similar issue. Thanks and happy coding.
22nd Oct 2020, 4:56 PM
BroFar
BroFar - avatar
+ 6
Serana Zentha , the code you presented has a bunch of issues. please rework this code, place it in playground and link it here. The task you are asking for is one of the new code coach exercises. It should be be done by yourself. Thanks for your understanding!
22nd Oct 2020, 4:49 PM
Lothar
Lothar - avatar
+ 6
go to top of thread and hit the three dots, tap edit and infront of the "I need help... line" Serana Zentha and type in [solved] Thanks ⚜⚘ DAC ⚘⚜
22nd Oct 2020, 5:12 PM
BroFar
BroFar - avatar
+ 3
What is the problem description..? What else part do here?
22nd Oct 2020, 4:31 PM
Jayakrishna 🇼🇳
+ 1
Nvm I just figured it out, test case 4 wants to make sure the outcome is not lrinted if it is negative
22nd Oct 2020, 4:48 PM
Serana Zentha
Serana Zentha - avatar
+ 1
Lothar already fixed it and it works, had to make sure it wouldnt print the values if it was negative
22nd Oct 2020, 4:51 PM
Serana Zentha
Serana Zentha - avatar
0
Jayakrishna🇼🇳 already figured this out, thanks for trying though, ill make it the best answer in case others have a similar problem
22nd Oct 2020, 4:56 PM
Serana Zentha
Serana Zentha - avatar
0
BroFar how do i mark as solvef
22nd Oct 2020, 4:57 PM
Serana Zentha
Serana Zentha - avatar