+ 1

Skee-ball, don't understand, why this code not working. Please help me.

import math point = int(input()) ticket = int(input()) check = int(point / ticket) if check >= 12: print("Buy it!") else: print("Try again")

10th Sep 2021, 10:28 AM
Aziz Ergashev
Aziz Ergashev - avatar
3 Answers
+ 3
#Try this: n=int(input()) t=int(input()) if n/12==t or n/12>t : print ("Buy it!"); else : print ("Try again");
10th Sep 2021, 10:33 AM
FꫀâČ…áƒ«á„†ÍŸá„™á„‰áŻœ
FꫀâČ…áƒ«á„†ÍŸá„™á„‰áŻœ - avatar
+ 1
Thank you bro👍
10th Sep 2021, 10:35 AM
Aziz Ergashev
Aziz Ergashev - avatar
+ 1
Hi Aziz! If you want to know why your solution doesn't work, It gives a zero division error for ticket = 0. For that, you can change your condition without declaring variable check. So, it needs to be like this, if point >= 12*ticket
10th Sep 2021, 11:18 AM
Python Learner
Python Learner - avatar