+ 2

I am trying to print the table of 12 using recursion method in python but there is some error

Pls help me below is my code https://code.sololearn.com/c9nJRVSEuTMn/?ref=app

9th Feb 2020, 5:57 PM
Prabhjot Singh
Prabhjot Singh - avatar
4 ответов
+ 5
I don't know much about global variables, I hope someone will post it. Here is an easy solution using parameter: def fun(i): print(12*i) i=i+1 if i<=10: fun(i) fun(0) You can also remove i = i + 1 and call fun(i+1)
9th Feb 2020, 6:03 PM
Denise Roßberg
Denise Roßberg - avatar
9th Feb 2020, 6:09 PM
Oma Falk
Oma Falk - avatar
+ 2
Thanks a lot oma falk and densie robberg
9th Feb 2020, 6:53 PM
Prabhjot Singh
Prabhjot Singh - avatar
+ 1
Prabhjot Singh your welcome :)
9th Feb 2020, 6:53 PM
Denise Roßberg
Denise Roßberg - avatar