Last active
February 28, 2017 22:22
-
-
Save filinvadim/cca29dd889a059b2a957f410195c5abf to your computer and use it in GitHub Desktop.
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
customers_balance_true = [25, 25, 25, 100] | |
customers_balance_false = [25, 25, 50, 100, 100] | |
def having_odd_money(money): | |
cinema_balance = 0 | |
for banknote in money: | |
if banknote == 25: | |
cinema_balance += banknote | |
elif banknote == 50: | |
cinema_balance += banknote/2 | |
cinema_balance -= banknote/2 | |
elif banknote == 100: | |
cinema_balance += banknote*0.25 | |
cinema_balance -= banknote*0.75 | |
return cinema_balance >= 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment