hdarwin

cstutoringcenter.com_Numerical Pattern II

Jan 4th, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.09 KB | None | 0 0
  1. sum = 0
  2. for x in xrange(1,20):
  3.     print x, x+1
  4.     sum += x**(x+1)
  5. print str(sum)
Advertisement
Add Comment
Please, Sign In to add comment