On 04/03/17 16:17, Sri Kavi wrote: > 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.
See the thread earlier today with the subject QUESTION for more on this topic. > Create a function that takes base and exponent as arguments. > > In the body of the function: > > set a result variable to the base. > Use 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. Is there anything there that you don't know how to do? If not have a go and if it does not work come back to us with your code and any error messages. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor