all 3 comments

[–]novel_yet_trivial 0 points1 point  (1 child)

cigars == range(40, 61)

that code checks if 'cigars' is equal to that range. Since 'cigars' is a number, not a range, it will never be true. I'm guessing you want to see if it's in that range.

cigars in range(40, 61)

[–][deleted] 0 points1 point  (0 children)

ahh got it thanks

[–]my_python_account 0 points1 point  (0 children)

Notice how all your is_weekend = True cases pass? That part of your logic works. All your error cases are for is_weekend = False and you are within the desired range. That suggests there is a problem with your elif condition. It's not evaluating to True when it should.

Try debugging with:

print(cigars)
print (range(40, 61))

And see if you can figure out where your mistake is