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 quotes(area,no_color) | |
no_color <= 2 ? color_price = no_color * 10 : color_price = 15 * no_color | |
return (area * 15 + color_price) * 1.15 | |
end | |
puts "10 sqft and 2 color should be 195.5 Actual return #{quotes(10,2)}" | |
puts "10 sqft and 3 color should be 224.25 Actual return #{quotes(10,3)}" |
NewerOlder