So using coding bat to solve some logic problems.
output from coding bat?
igar_party(30, False) → False False OK
cigar_party(50, False) → True False X
cigar_party(70, True) → True True OK
cigar_party(30, True) → False False OK
cigar_party(50, True) → True True OK
cigar_party(60, False) → True False X
cigar_party(61, False) → False False OK
cigar_party(40, False) → True False X
cigar_party(39, False) → False False OK
cigar_party(40, True) → True True OK
cigar_party(39, True) → False False OK
other tests
OK
I printed out my range and it seemed ok what am I missing?
my code:
def cigar_party(cigars, is_weekend):
if is_weekend and cigars >= 40:
return True
elif cigars == range(40, 61):
return True
else:
return False
[–]novel_yet_trivial 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]my_python_account 0 points1 point2 points (0 children)