Controlling Digits output for same numbers used but different outputs

asked 2018-07-26 11:17:53 -0600

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

Worksheet Example

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



edit retag flag offensive close merge delete


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)?

rburing gravatar imagerburing ( 2018-07-26 12:21:23 -0600 )edit

To share documents from CoCalc, in the "Files" view of your CoCalc project, select a file and click "Share"; this will give you a url on the CoCalc share server; use that url to let others see the file you made public.

slelievre gravatar imageslelievre ( 2018-11-04 17:33:59 -0600 )edit

Or you could ask help from the CoCalc team -- in that case use the help button at CoCalc; if you do that from the document you are having trouble with, or if you provide the url to it, they'll be able to access it and hopefully they can help.

slelievre gravatar imageslelievre ( 2018-11-04 20:28:20 -0600 )edit