Skip to content

Instantly share code, notes, and snippets.

@laurenachoo
Created April 29, 2015 15:27
Show Gist options
  • Select an option

  • Save laurenachoo/4492f23681c03a6c891e to your computer and use it in GitHub Desktop.

Select an option

Save laurenachoo/4492f23681c03a6c891e to your computer and use it in GitHub Desktop.
def size_finder
puts 'How long is your sign? '
length = gets.chomp.to_f
puts 'How wide is your sign? '
width = gets.chomp.to_f
@total_size = length*width
end
def colour_finder
puts 'How many colours? '
colours_answer = gets.chomp.to_i
if colours_answer <= 2
@colours_price = colour_answer * 10
else @colours_price = colours_answer * 15
end
end
def tax_finder
tax = (@total_size + @colours_price)* 1.15
puts "Your total is #{tax}"
end
size_finder
colour_finder
tax_finder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment