Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This algorithm was crated by Lucas Pereira Torres de Araujo
- #Lista 3 - FUP's Class - 2016.1
- #Item 1.31
- s = 0
- for i in xrange(1, 4):
- i = float(i)
- if i%2 == 0:
- s -= 1/(i+2) #PAR
- else:
- s += 1/(i+1) #IMPAR
- print "S =", s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement