round off float to 2 decimal places in python
answer = str(round(answer, 2))
round off float to 2 decimal places in python
answer = str(round(answer, 2))
how to round floats
//In the %.1f the 1 represents tenths if we put 2f then it would be hundreths,
//aka: (1.28) while the 1f would be (1.3).
perc = 1.28278268
VARIABLE = "%.1f" % perc
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us