

Python Tutor: Visualize Code Execution - r4vik
http://www.pythontutor.com/visualize.html

======
mjhea0
[http://www.pythontutor.com/visualize.html#code=%23+Write+a+f...](http://www.pythontutor.com/visualize.html#code=%23+Write+a+function,+power\(\),+that+takes+two+%0A%23+non-
negative++integers,+base+and+exponent,+%0A%23+and+prints+the+base+raised+to+the+exponent+%0A%23+power.%0A%0A%23+Do+not+use+the+base+**+exponent+\(2**4\)+%0A%23+notation.%0A%0A%0Adef+power\(base,+exponent\)%3A%0A++++new_base+%3D+1%0A++++for+x+in+range\(0,exponent\)%3A%0A++++++++new_base+*%3D+base%0A++++print+new_base%0A%0Aprint+pow\(3,10\)+%3D%3D+59049&mode=display&cumulative=false&heapPrimitives=false&drawParentPointers=false&textReferences=false&showOnlyOutputs=false&py=2&curInstr=2)

------
duberton
awesome work!

