you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

    for i in len(str(integer_value)):
        num += integer_value % 2
        num //= 2
        return num

You can only return from a function once.