Your redeclaring the function printThis twice. Name thrm printA and printB. As your currently calling the second one twice.
Ian
From this function I m expecting this result:--printStack(2,3)AAA number: 1AAA number: 2BBB number: 1BBB number: 2BBB number: 3But instead I am getting this result!? Why isnt it giving me my expected result.printStack(2,3)BBB number: 1BBB number: 2BBB number: 3BBB number: 1BBB number: 2BBB number: 3def 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 python_inside_m...@googlegroups.com.
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.