2
You have 99 different definitions of functions:
def Fun_1():
...
def Fun_2():
...
def Fun_3():
...
...
...
def Fun_99():
...
the value of the variable x
is obtained at random between 1 and 99:
x = aleat(0, 99)
The variable NomeFun
is obtained by the concatenation of "Fun_"
, the value of x
converted to string and "()"
:
NomeFun = "Fun_" + str(x) + "()"
How to encode, in Python, the call to the function whose name corresponds to the contents of the variable NomeFun
? It would be something like:
execute(NomeFun) ???