Skip to content

Instantly share code, notes, and snippets.

@liuderchi
Created December 8, 2015 06:21
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/e27c138c17afecf24a9f to your computer and use it in GitHub Desktop.
Save liuderchi/e27c138c17afecf24a9f to your computer and use it in GitHub Desktop.
wk3-q2
menu = [ 25, 105, 38, 55, 110 ]
drink = [ 35, 88, 140 ]
def change_price( price ):
result = []
for e in price:
if e > 100:
e = e - 20
result.append(e)
return result
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