So I'm talking to a friend about the following function. Lets suppose that the input to the function is 100. One says that this would print 100, 50, 25, 12, 6, 3, 1, 1 while the other one argues that it should print 100, 101, 50, 51, and so on. I tried to run it to see the result myself, however I have no experience in Python and this is just an exercise from a textbook and when I tried to run it on ideone it didn't provide any output. Thanks!
def CodeWrite (N):
if (N > 0):
print(N)
CodeWrite(N / 2)
print(N + 1)