Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. size = int(input())
  2. fibonacci_list = [1]
  3. start = 0
  4. next = 1
  5. for _ in range(size - 1):
  6.     if size != 1:
  7.         total = start + next
  8.         fibonacci_list.append(total)
  9.         start = next
  10.         next = total
  11. print(*fibonacci_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement