print value upto two digit precision in python code example
Example 1: print 2 decimal places python
print("{0:.2f}".format(sum(query_marks)/len(query_marks)))
Example 2: printing float number python
x = 1.1234567898
print("%.10f" % x)
print("{0:.2f}".format(sum(query_marks)/len(query_marks)))
x = 1.1234567898
print("%.10f" % x)