79468442

Date: 2025-02-26 03:36:03
Score: 3.5
Natty:
Report link

Should'n it be as simple as this?

def round_down(num, decimals):
    a, b = str(num).split(".")
    return f"{a}.{b[:decimals]}"

a = 28.266
print(round_down(a, 2))
# 28.26
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Henrique Bonadio