I would like to make a function:
def accuracy(number, index):
For example
accuracy(2.5e-10, -5)would return 0.accuracy(49, 2)would return 0.accuracy(50, 2)would return 100.So basically it would round to the closest 10 power of the index
indexHow would you do that?
round()? What is the problem with your code, do you get an error or incorrect results?