This was a result of converting degrees to radians. There is another way as well.
from math import sin, acos def nines(repeat: int) -> float: repeated = 2 / int('9' * repeat) value = sin(repeated) * acos(repeated) * (10 ** repeat) return value nines(18)
Took a while to convince me, but you got there.
value = sin(repeated) * acos(0) * (10 ** repeat)
This was a result of converting degrees to radians. There is another way as well.
I'm sure this can be edited to accept other values in the same way.Took a while to convince me, but you got there.