This is my code, while I am running my function rwpos() is supposed to return something, but it is not returning anything. Please help me through this...
import random
def rs():
return random.choice([-1,1])
def rwpos(start,nsteps):
if nsteps == 0:
print start,nsteps
return start
else:
start = start + rs()
rwpos(start,nsteps-1)
x = rwpos(40,4)
print x
x is printing None ... ~