Storing decimal numbers takes up more computer memory than storing integers because of all those decimal places. The more precision you are looking for the more space it takes up. Although today’s computers come with plenty of memory, it is prudent to only use up what you really need.
While internally, numbers are always stored with the precision dictated by the number’s data type, for visualization purposes you can specify the number of decimal places to display using %.1f (one decimal place), %.2f (two decimal places), etc.
What happens if the precision of the format specifier exceeds that of the number being displayed? For example, if the user enters 1.77 in the code window above, but the code specifies the output to have four decimal places, %.4f, what will happen?