Subash Chandran posted: ">>> x = 13.949999999999999999 >>> x 13.95 >>> g = float("{0:.2f}".format(x)) >>> g 13.95 >>> x == g True >>> h = round(x, 2) >>> h 13.95 >>> x == h True"
|

Subash Chandran posted: ">>> x = 13.949999999999999999 >>> x 13.95 >>> g = float("{0:.2f}".format(x)) >>> g 13.95 >>> x == g True >>> h = round(x, 2) >>> h 13.95 >>> x == h True"
|
Write a newfangled code fragment at an earlier stage to use it. Then call another method and make sure their input is the correct one. The s...
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.