Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- total = 0
- fibonacci = [1, 2]
- temp = True
- while temp:
- temp = sum(fibonacci[-2:])
- if temp >= 4000000:
- break
- else:
- fibonacci.append(temp)
- for f in fibonacci:
- if f / 2 == f // 2:
- total = total + f
- else:
- pass
- print(total)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement