I have an issue in printing a float number. I tried:
a = 2
c = 4
print (str(c/a).format(1.6))
Output:
2.0
Required Output:
2.000000
How can I print up to 6 decimal places?
I have an issue in printing a float number. I tried:
a = 2
c = 4
print (str(c/a).format(1.6))
Output:
2.0
Required Output:
2.000000
How can I print up to 6 decimal places?
This can be accomplished by:
print("{:.6f}".format(your value here));