Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def positive_fibonacci(num: int) -> list:
- positive_numbers = [0, 1]
- for i in range(1, num):
- positive_numbers.append(positive_numbers[-1] + positive_numbers[-2])
- return positive_numbers
- def negative_fibonacci(num: int) -> list:
- negative_numbers = [0, 1]
- for i in range(1, num):
- negative_numbers.append(negative_numbers[-2] - negative_numbers[-1])
- return negative_numbers
- def integrate(num_limit:int):
- print(negative_fibonacci(num_limit)[::-1] + positive_fibonacci(num_limit)[1:])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement