Skip to content

Instantly share code, notes, and snippets.

@McTano
Created May 28, 2016 20:39
Show Gist options
  • Save McTano/8f2769de82dc81adc137781a8735ea29 to your computer and use it in GitHub Desktop.
Save McTano/8f2769de82dc81adc137781a8735ea29 to your computer and use it in GitHub Desktop.
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