My Code :
import math
def CalPI(precision):
answer = round((math.pi),precision)
return answer
precision=raw_input('Enter number of digits you want after decimal:')
try:
roundTo=int(precision)
print CalPI(roundTo)
except:
print 'Error'
When I run this code I get the output max only upto 11 decimal places. However I want to generate the output according to the input given by user.
Can anyone tell me where I am going wrong?
Thank you in advance!