Created
April 29, 2015 15:27
-
-
Save laurenachoo/4492f23681c03a6c891e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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