Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Python: How to create Power function

Python: How to create  Power function

def power(x, n):
    if n == 0:
        return 1
        return x * power(x, n-1)
print power(2,8) # 256

Users who found this page were searching for:

  • build array with list in python
  • java ComputeCrc32Hash
  • python email message_from_string
  • how to read mail from yahoo with java mailing
  • Python read zip content
  • Drawing a Checkerboard in Java
  • python percentage in class
  • java how to print out enum types

No comments yet.

Leave a Comment