Nov-23-2018, 12:50 AM
(This post was last modified: Nov-23-2018, 02:14 AM by ichabod801.)
This is an example of an issue that I have:
why if a function calls another function the return of the called function is not accurate:
I have inserted some print instructions to evidence the outputs. thank you for your help.
why if a function calls another function the return of the called function is not accurate:
I have inserted some print instructions to evidence the outputs. thank you for your help.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
def multiplicacion(a,b): producto = a * b print producto if a>b: return producto if b>a: a + = 1 multiplicacion(a,b) print str (producto) + "END" return producto def maths(a, b): pluss = multiplicacion(a,b) print str (pluss) + " end " maths( 5 , 6 ) |