Hi! I could not see what's wrong with my code. Any explanation svp?. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Hi! I could not see what's wrong with my code. Any explanation svp?.

pnts=int(input()) cost=int(input()) l=int(pnts/12) if l>cost : print('Buy it!') else : print("Try again") You are playing a game at your local arcade, and you receive 1 ticket from the machine for every 12 points that you score. You want to purchase a squirt gun with your tickets. Given your score, and the price of the squirt gun (in tickets) are you able to buy it? Task Evaluate whether or not you have scored high enough to earn enough tickets to purchase the squirt gun at the arcade. Input Format The first input is an integer value that represents the points that you scored playing, and the second input is an integer value that represents the cost of the squirt gun (in tickets). Output Format A string that say 'Buy it!' if you will have enough tickets, or a string that says 'Try again' if you will not. Sample Input 500 40

1st Jul 2021, 9:39 PM
Rim Bziouich
2 Answers
+ 4
"I" should be greater or equal to cost since when the value of the tickets divided by 12 equals to the price of the squirt gun, its purchase becomes possible.
1st Jul 2021, 9:58 PM
Delphinus Derick🇹🇿👑
Delphinus Derick🇹🇿👑 - avatar
+ 1
Ah ,of course! Thank you.
2nd Jul 2021, 7:27 AM
Rim Bziouich