It was corect accroding to the software, but is it the proper way of writing it?


#1

This is the following code I wrote:

1# Reassign meal on line 7!
2
3 meal = 44.50 * 0.0675
4 tax = 0.0675
5 tip = 0.15
6
7 meal = 44.50 + 3.00375

It said I was correct and to move on.. but I feel the fomat is not correct.. It seems sloppy to me.

`


#2

You've got everything right (As you said). But from my point of view, I think this exercises point is to use the "Variable's" and not the values in the variable's. That's the whole point of a "Variable" :smiley:

Here's how I did it:

# Reassign meal on line 7!

meal = 44.50
tax = 0.0675
tip = 0.15

meal = meal + meal * tax

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.