SyntaxFix
Write A Post
Hire A Developer
Questions
To set precision with 9 digits, get:
print "%.9f" % numvar
Return precision with 2 digits:
print "%.2f" % numvar
Return precision with 2 digits and float converted value:
numvar = 4.2345 print float("%.2f" % numvar)