+ 2

Why this code fails in Test Case 3 ?

I am solving Skee Ball Challenge and I write this code but I don't know why it fails in Test Case 3. Explain me and give ur kind suggestions. Score = int(input()) GunPrice = int(input()) x = Score//12 if GunPrice < x : print ("Buy it!") elif GunPrice > x : print ("Try again")

11th Jan 2020, 4:58 AM
Ashutosh R. Yadav
Ashutosh R. Yadav - avatar
3 odpowiedzi
+ 12
You haven't considered the case of equality, i.e. When GunPrice==x
11th Jan 2020, 5:11 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
11th Jan 2020, 5:22 AM
Ashutosh R. Yadav
Ashutosh R. Yadav - avatar