Warning 2.9.1.
Beginners sometimes confuse โmeaningful to the human readersโ with โmeaningful to the computerโ. So theyโll wrongly think that because theyโve called some variable
average
or pi
, it will somehow automagically calculate an average, or automagically associate the variable pi
with the value 3.14159. No! The computer doesnโt attach semantic meaning to your variable names.So youโll find some instructors who deliberately donโt choose meaningful names when they teach beginners โ not because they donโt think it is a good habit, but because theyโre trying to reinforce the message that you, the programmer, have to write some program code to calculate the average, or you must write an assignment statement to give a variable the value you want it to have.