Question #274787

def countdown (n):

If n<=0:

print('Blastoff!')

else:

print(n)

countdown(n-1)

Write a new recursive function countup that expects a negative argument and counts "up" from that number.


Expert's answer

def countup(n):



    if n>=0:



        print('Blastoff!')



    else:



        print(n)



        countup(n+1)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS