Charlie
0
Q:

to increase set precision in python

# using round() to print value till 2 decimal places  
print ("The value of number till 2 decimal place(using round()) is : ",end="") 
print (round(3.1416,2)) 

# using format() to print value till 2 decimal places  
print ("The value of number till 2 decimal place(using format()) is : ",end="") 
print ("{0:.2f}".format(56)) #will add 0 after decimal point for int values
3

New to Communities?

Join the community