Hello, in this exercise https://www.codecademy.com/courses/learn-python-3/projects/furniture-store, it says to update the variable customer_one_total
to the price of the lovely loveseat and luxurious lamp. I wonder, why can’t I just assign them directly to the variable the first time I declared customer_one_total
instead of putting a 0 there. The output of the result is exactly the same without repeating the variable again by assigning the price of the lovely loveseat and luxurious lamp to customer_one_total
when I first declared it.
Since it still displays the same result if I follow the project’s instructions, is there a potential bug that I should be aware of when writing it in this way?
In case of confusion, here’s what I’m trying to say:
lovely_loveseat_price = 254.00
luxurious_lamp_price = 52.15
Instead of
customer_one_total = 0
customer_one_total += lovely_loveseat_price + luxurious_lamp_price
I did,
customer_one_total = lovely_loveseat_price + luxurious_lamp_price