It is currently tax season, so this is pretty on topic. But, what we're making is a lot simpler than something I could use to file my taxes.
What we want is a program that will answer the question, "How much money is my purchase after tax is added?"
For example, in JavaScript:
// Input Variables
var purchase = 100.00;
var tax_rate = 1.06;
// Let's calculate the answer
var total = tax_rate * purchase;
// Let's format the message
var message = "The total on a purchase of "+purchase+
" dollars with a tax rate of "+tax_rate+
" is "+total+
" dollars.";
// And let's output the message and be done
console.log(message);
bank_balance
with the value -0.05
? Demonstrate your answer with screenshots.bank_balance
>"? Demonstrate your answer with screenshots.Links:
purchase
variable to 99.99
and the tax_rate
variable to 1.07
. Demonstrate your answer with screenshots.For each of the following, demonstrate your answer with screenshots of the program you wrote above being used to answer the word problem:
1234.56
at a tax rate of 1.23
?19.99
at a tax rate of 1.05
?1.49
) plus fries (0.49
) plus a large drink (0.99
), at a tax rate of 1.06
?