>From this function I m expecting this result:
printStack(2,3)
AAA number: 1
AAA number: 2
BBB number: 1
BBB number: 2
BBB number: 3
But instead I am getting this result!? Why isnt it giving me my expected
result.
printStack(2,3)
BBB number: 1
BBB number: 2
BBB number: 3
BBB number: 1
BBB number: 2
BBB number: 3
def printStack(numTimes_A=None,numTimes_B=None,):
''' print AAA x times '''
def printThis():
for x in range (numTimes_A):
int = (x+1)
print "AAA number: " + str(int)
''' print BBB x times '''
def printThis():
for i in range (numTimes_B):
int = (i+1)
print "BBB number: " + str(int)
if numTimes_A >= 1:
printThis()
if numTimes_B >= 1:
printThis()
printStack(2,3)
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/7366c07c-104f-4a8e-b0a9-38533d86b60e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.