print answer in 2 decimal places python code example
Example 1: give answer in 6 decimal python
print("{:.6f}".format(variable_name))
Example 2: python print 2 decimal places
# this will print up to digits after decimal
print("%.2f" % (70/105))
print("{:.6f}".format(variable_name))
# this will print up to digits after decimal
print("%.2f" % (70/105))