Created
August 11, 2013 20:53
-
-
Save stevencombs/6206797 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function to determine the minimum payment | |
# A Codecademy Python (Something of Interest) assignment | |
# Dr. Steven B. Combs, coding novice | |
def hotel_cost(nights): | |
return nights * 140 | |
bill = hotel_cost(5) | |
def get_min(balance,rate): | |
return balance * rate # Calculates the minimum payment | |
def add_monthly_interest(balance): | |
interest = balance * (0.15/12) # Calculate interest | |
return balance + interest # Return the sum of the balance and interest | |
print get_min(bill, 0.02) # Two values, bill and 0.02, are passed to function get_min |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment