Skip to content

Instantly share code, notes, and snippets.

@liuderchi
Last active December 8, 2015 06:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liuderchi/a749009e04972a8aaa10 to your computer and use it in GitHub Desktop.
Save liuderchi/a749009e04972a8aaa10 to your computer and use it in GitHub Desktop.
wk3-q1
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