Last active
December 8, 2015 06:20
-
-
Save liuderchi/a749009e04972a8aaa10 to your computer and use it in GitHub Desktop.
wk3-q1
This file contains hidden or 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
menu = [ 25, 105, 38, 55, 110 ] | |
drink = [ 35, 88, 140 ] | |
def change_price( price ): | |
i = 0 | |
while i < len(price): | |
if price[i] > 100: | |
price[i] = price[i] - 20 | |
i = i + 1 | |
return price | |
print change_price( menu ) | |
print change_price( drink ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment