def fibonacci_sequence(n):sequence = [1, 1]for i in range(2, n):next_num = sequence[i-1] + sequence[i-2]sequence.append(next_num)return sequence
N = 10result = fibonacci_sequence(N)print(result)
def fibonacci_sequence(n):
sequence = [1, 1]
for i in range(2, n):
next_num = sequence[i-1] + sequence[i-2]
sequence.append(next_num)
return sequence
N = 10
result = fibonacci_sequence(N)
print(result)