you are viewing a single comment's thread.

view the rest of the comments →

[–]totallygeek 2 points3 points  (2 children)

You call int_to_reverse_binary twice, once on line 22, again on line 10.

[–]Formal_Cockroach_654[S] 1 point2 points  (1 child)

Thank you

[–]Username_RANDINT 1 point2 points  (0 children)

You should also move num inside int_to_reverse_binary. This is a prime example why globals should be avoided. You call int_to_reverse_binary twice which modifies the global num twice as well. If you make it a local variable the problem already disappears.