0
Sleep-ball
My code is successful 4/5 times for the Skee-ball challenge using Python. Besides it being super basic, I’m not sure what’s wrong with it... Thanks for the help! score = int(input()) ticketPrice = int(input()) tickets = int(score/12) if tickets > ticketPrice: print("Buy it!") else: print("Try again")
5 ответов
+ 4
Try it the other way round or with a greater-equal 😉
+ 2
Brent Larke That type of error is so common it deserves a wikipedia article: https://en.wikipedia.org/wiki/Off-by-one_error
So don't worry, it happens to the best of us (all the time).
+ 1
ah yes i see :( so basic. maybe im not cut out for this. thank you very much
0
You're welcome
0
x=int(input())
y=int(input())
if ((x/12)>=y):
print("Buy it!")
else:
print("Try again")
It's simple and easy try copy pasting in exact same way.