First Uni Assignment Returned

Hey all! I just got my first uni assignment back for intro to programming and got an 82%. Not too shabby.

I understand where I lost part marks, but wondering if anybody can help me out with this comment from the TA:

Use of named constants: 0/6

I’m not sure if I missed the section in the textbook about named constants or what, but I have no idea what they are. Any insight?

Named constants means that if you have some fixed number, or string, or

other value, instead of writing:

if margin < 1.2:

    margin = 1.2

you write:

at the top of the program

MINIMUM_MARGIN = 1.2

later on

if margin < MINIMUM_MARGIN:

   margin = MINIMUM_MARGIN

Ah okay, that makes sense. I suppose that would have been more logical. In my program, for example, I had one line similar to
(totalCost = totalCost + (totalCost * 0.13))
to represent the total cost with taxes. Instead, I could have named it as a constant and written
(totalCost = totalCost + (totalCost * TAX_RATE))
instead so that the user knew the importance of the 0.13.