Question: Match the following lines of code with their corresponding method of creating a loop or recursion. - def count ( x = 0 , limit
Match the following lines of code with their corresponding method of creating a loop or recursion.
def count x limit :
while x limit:
prinit x
x x
else:
return limit
printcount
def count x limit :
return i for i in range x limit
print count
def count x limit :
if x limit:
prinit x
return countx
else:
return limit
printcount
def count x limit:
loop until x limit:
print x
x x
printcount
A
While Loop
B
Not a valid method of creating a loop or recurrsion
C
For Loop
D
recurrsion
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
