[Tutor] changing name value with function return
richkappler at gmail.com
Tue Oct 30 17:56:09 CET 2012
If I have a variable and send it's value to a function to be modified and
returned, how do I get the function return to replace the original value of
x = 50
d = random.uniform(-10, 10)
x = x + d
When I call rndDelta, it functions as intended, I get a return that is x
adjusted by some random value. This, however, I know does not actually
change x. Let's say I call randDelta(x) and it returns 42.098734087, if I
then type x, I still get 50. I want x to now be 42.098734087.
sic gorgiamus allos subjectatos nunc
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor