round function not working in python

Two issues:

  • round(3,98.9898, 2) is code that you enter. Omit the comma yourself and your problem goes away. Otherwise give us more info about your problem.

  • def round(x, n): return round(x, n)
    Even if you fix your function call, you’ll most likely end up with RuntimeError due to maximum recursion. Rename your function to something other than round.

Leave a Comment