Skip to content

Instantly share code, notes, and snippets.

@liuderchi liuderchi/wk3-q2.py
Created Dec 8, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.