Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n=int(input('N='))
- a=1
- sum=0
- print('The series is',end=' ')
- for i in range(1,n):
- print (a,end='+')
- sum=sum+a
- a=a*2
- print(a)
- print('The sum of the series is %d'%(sum+a))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement