# Controlling Digits output for same numbers used but different outputs

I am a teacher how is working with sagetex to automate some worksheets to save some time on creating different versions.

In my worksheets students are given numbers to 2 or 3 digits of accuracy, but later there is a solution guide attached, and I would like to change the level of accuracy. An example: 2.5 times 350 equals 875, but rounded to 2 digits is 880. I would like to change the accuracy of the solutions produced.

I am still very new to all this, and would love any advice or help.

CoCalc Kinetic Energy tex file

CoCalc Kinetic Energy Worksheet pdf

Thanks,

Your links don't work. You should write any relevant code here instead. Do I understand correctly that for x = 875 and digits_accuracy = 2 you want to obtain round(x/10^(len(str(x))-digits_accuracy))*10^(len(str(x))-digits_accuracy)?