Skip to content

Instantly share code, notes, and snippets.

@MikaAK
Created June 4, 2014 01:53
Show Gist options
  • Save MikaAK/3664e863f1dde2b0286f to your computer and use it in GitHub Desktop.
Save MikaAK/3664e863f1dde2b0286f to your computer and use it in GitHub Desktop.
def sign height, width, color = []
total = 0
sqrfeet = height * width
total = sqrfeet * 15
print "Enter your colors seperated with commas: "
color = gets.chomp.split(',').trim
if color.length > 2
total += color.length * 15
else
total += color.length * 10
end
total += total * 0.15
end
puts "Expect sign(4,4) equal: 276 actual: " << sign(4,4).to_s
puts "Expect sign(4,4,['blue','green','red']) equal: 327.75 actual: " << sign(4,4,['blue','green','red']).to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment