Hover craft | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hover craft

I built this code and in the test cases there are locked ones. I don’t quite understand why. sold=(int(input())*3000000) m=2000000*10+1000000 if sold>m: print ("Profit") elif sold==m: print ("Broke Even") elif sold<m: print ("Loss")

25th Jan 2023, 6:51 PM
james ewell
james ewell - avatar
3 Answers
+ 4
I changed the code very slightly and it worked... sold=(int(input())*3000000) m=21000000 if sold>m: print ("Profit") elif sold==m: print ("Broke Even") elif sold<m: print ("Loss")
25th Jan 2023, 7:20 PM
Ausgrindtube
Ausgrindtube - avatar
+ 3
It's common to have locked cases, so you have to think abstractly about the problem and can solve "all possible problems/cases" not just the ones you know about. I have the same locked cases as you.
25th Jan 2023, 7:29 PM
Ausgrindtube
Ausgrindtube - avatar
0
But do you not have case that are locked?
25th Jan 2023, 7:28 PM
james ewell
james ewell - avatar