× Didn't find what you were looking for? Ask a question
Top Posters
Since Sunday
r
5
m
5
h
5
r
5
t
5
B
5
P
5
s
5
m
5
c
5
c
4
4
New Topic  
DJ DJ
wrote...
Posts: 772
10 years ago
Use a repeat loop structure to produce a non-recursive program segment that prints the same sequence of numbers as the following recursive function.

   def xxx(N):
       print(N)
       if (N < 5):
        xxx(N + 1)

This is for my computing programming course
Read 320 times
1 Reply

Related Topics

Replies
wrote...
10 years ago
repeat:
    print(N)
                N = N + 1
    until (N > 6)
New Topic      
Explore
Post your homework questions and get free online help from our incredible volunteers
  927 People Browsing
Related Images
  
 233
  
 52
  
 473
Your Opinion

Previous poll results: Do you believe in global warming?