I was wondering why there is an error using a variable inside of the f statement and how I could fix it.
The code:
from math import *
precision = float(input("Enter digits of decimals:"))
print(f'The value of pi to {precision} digits is: {pi:.{precision}f}')
And the error:
print(f'The value of pi to {precision} digits is: {pi:.{precision}f}')
ValueError: Invalid format specifier