hdarwin

cstutoringcenter.com_A Power Function

Dec 28th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. #!/usr/bin/env python
  2.  
  3. def f(x,y):return x**y + y**x
  4. total = 0
  5. for x in xrange(1,16):
  6.         total = total + f(x,x+1)
  7. print total
Advertisement
Add Comment
Please, Sign In to add comment