Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 9 Online
OpenStudy (anonymous):

str(round(balance,2)) can someone explain what the ,2 is .i understand most of the program just not the 2

OpenStudy (anonymous):

Isn't it rounding or truncating to the second digit?

OpenStudy (anonymous):

thank you the word truncating gave me my explanation

OpenStudy (anonymous):

pardon my spelling

OpenStudy (anonymous):

Its not same as truncating. Say if you round a number 3.89 to 1 digits after decimal ..round(3.89,1) it would give 3.9 Not 3.8 which would have been the if it were merely truncating the digits

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!