recursion - Create a Python recursive function that prints all the integers less than or equal to the value provided in the original call -


i=0 def recursiveintegers(n):     if n==1:        return 1;     else:        reqval= n-1;        print("less or equal original -->",reqval);        return recursiveintegers(reqval)  uservalue = int(input("enter value "))  recursiveintegers(uservalue) 

what missing print out equal values..?

print 'n' first ... 'reqval = n-1'


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -