+ 2

How to solve both cases at same time gothem city question

How to solve both cases at same time if one in correct other in wrong total_number_ofcriminals = int(input ()) n = total_number_ofcriminals if n < 5: print ("I got this!") elif n < 10: print ("Help me Batman") elif n > 10: print ("Good Luck out there")

19th Jan 2024, 5:06 PM
FAISAL
3 Réponses
+ 7
Each test case runs with a different input number. The test will take care of giving the right number, but your code needs to accept it. Try like this: n = int(input())
19th Jan 2024, 5:38 PM
Tibor Santa
Tibor Santa - avatar
+ 2
Tibor Santa Thanks bro i have solved it thanks to you
19th Jan 2024, 6:01 PM
FAISAL
0
Hm Id , Please add [Solved] to the title, add a python tag, and choose the best answer.
20th Jan 2024, 12:29 AM
Rain
Rain - avatar