Created
May 28, 2016 20:39
-
-
Save McTano/8f2769de82dc81adc137781a8735ea29 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
def add_tax(cost, tax_rate) | |
price + (price * tax_rate) | |
end | |
def sign_cost(height, width, color_count) | |
subtotal = height * width * 15 | |
color_modifier = (color_count <= 2) ? 10 : 15 | |
subtotal += subtotal * color_modifier | |
total = add_tax(subtotal, 0.15) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment