Skip to content

Commit

Permalink
Merge pull request #84 from DragoVeizen/main
Browse files Browse the repository at this point in the history
Issue #10 resolved in python
  • Loading branch information
ademclk authored Oct 15, 2022
2 parents 0a26541 + b347ddd commit b786f62
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions challenges/Python/fibonacci_odd_sum/fibonacci_odd_sum.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
def fibonacci_odd_sum :
prev, cur = 0, 1
total = 0
while True:
prev, cur = cur, prev + cur
if cur >= 10000:
break
if cur % 2 != 0:
total += cur
print(total)

0 comments on commit b786f62

Please sign in to comment.