Answer to Question #103496 in Python for Samuel

Question #103496
Write a new recursive function countup that expects a negative argument and counts “up” from that number
1
Expert's answer
2020-02-21T09:47:49-0500
def count_up(n):
  if n >= 0:
    print("Go!")
    return
  print(n)
  count_up(n+1)

count_up(-10)

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS