Skip to content

Instantly share code, notes, and snippets.

@nharrell04
Last active December 15, 2015 04:29
Show Gist options
  • Save nharrell04/5202065 to your computer and use it in GitHub Desktop.
Save nharrell04/5202065 to your computer and use it in GitHub Desktop.
I get this error: Traceback (most recent call last): File "python", line 9, in <module> File "python", line 7, in get_min NameError: global name 'balance' is not defined Oops, try again. Did you create a function called get_min? from the messageboard it seems other folks got it to work w/ similar code.
def hotel_cost(nights):
return nights * 140
bill = hotel_cost(5)
def get_min(balance, rate):
return balance * rate
print get_min(bill,.02)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment