Computer Science, asked by birdlover2623, 5 months ago

def testing(num):
if(num>50):
return(num - 2)
return testing (testing(num + 10));
print(testing(30))

Answers

Answered by Oreki
8

Snippet:

 def testing(num):

     if (num>50):

        return (num - 2)

     return testing(testing(num + 10));

  print(testing(30))

Output:

  52

Answered by sandeepmisra
3

Answer:

52

Explanation:

testing(30)

=> testing(testing(40))

=> testing(testing(testing(50)))

=> testing(testing(testing(testing(60))))

=> testing(testing(testing(58)))

=> testing(testing(56))

=> testing(54)

=> 52

Similar questions