+ 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")
3 RĂ©ponses
+ 3
#Try this:
n=int(input())
t=int(input())
if n/12==t or n/12>t :
print ("Buy it!");
else :
print ("Try again");
+ 1
Thank you brođ
+ 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