Hi,

I'm a beginner learning to program with Python. I'm trying to explain a
solution in plain English. Please correct me if I'm wrong.


Create a function that takes base and exponent as arguments.



In the body of the function:

set a result variable to the base.



User a for-loop with a range of 1 to the exponent.

With each iteration, set the result to the product of result times base.



After the loop, return the result.



Call the function.





Regards
Sri
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to