Skip to content

Instantly share code, notes, and snippets.

@liuderchi liuderchi/wk3-q1.py
Last active Dec 8, 2015

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