How do we round off a number to decimal places that we want in python?

前端 未结 0 1717
暗喜
暗喜 2020-12-22 07:18

Which expression should I use to on rounded_num to round off to two decimal places?

def round_to_2_decimals(num):
    rounded_num = ??

    return rounded_nu         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题