 A constant is a quantity which does not change while a variable is a quantity that has the ability to change.

(Cleary & Klimenko, 2011). These two terms are commonly used in mathematical equations, geometry and even in functions. They are also used in computer science in source codes. In this case, constants are defined to be fixed.

[quix id='73' name='order now banner 7']

For instance k = 2, where in any case k is used in the source code, it will always be assigned 2. On the other hand, variables are defined as integers x, characters r or float g. A variable can also be used to represent values which are not known in equations while constant represents the know value

(Frese, Wilkens, Huber, Jensen, Oelfke& Taheri, 2011).

Variables can be dependent or independent. For instance, if y = x+4 it means that x is the independent variable while y is the dependent variable while 4 is a constant since it is not affected by change of values of x and y. From the above example when x = 1, y = 5, when x = 2, y = 6. A constant always fixed while a variable is not.

[quix id='70' name='order now banner 4']

### References

Cleary, M. J., & Klimenko, A. Y. (2011). A detailed quantitative analysis of sparse-Lagrangian filtered density function simulations in constant and variable density reacting jet flows. Physics of Fluids.

Frese, M. C., Wilkens, J. J., Huber, P. E., Jensen, A. D., Oelfke, U., & Taheri-Kadkhoda, Z. (2011). Application of constant vs. variable relative biological effectiveness in treatment planning of intensity-modulated proton therapy.