Created
February 13, 2014 17:23
-
-
Save JakenHerman/8979686 to your computer and use it in GitHub Desktop.
cigar_party in Coding Bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Jaken' | |
def cigar_party(cigars, is_weekend): | |
if is_weekend and cigars >= 40: | |
return True | |
elif is_weekend and cigars < 40: | |
return False | |
elif not is_weekend and cigars < 40 and cigars > 60: | |
return False | |
elif not is_weekend and cigars >= 40 and cigars <= 60: | |
return True | |
else: | |
return False | |
def cigar_party(cigars, is_weekend):
if is_weekend and 40<=cigars or 40<=cigars<=60:
return True
return False
one line logic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A shorter version 🤷🏻♂️