gpt-4-1106-preview· OpenAI
Arena Human Preference 55K
write a python program to print the first 50 fibonacci numbers
- User
write a python program to print the first 50 fibonacci numbers
- Assistant
Sure, here's a Python program that prints the first 50 Fibonacci numbers:
def fibonacci(n): fib_sequence = [0, 1] while len(fib_sequence) < n: next_value = fib_sequence[-1] + fib_sequence[-2] fib_sequence.append(next_value) return fib_sequence # Print the first 50 Fibonacci numbers first_50_fib_numbers = fibonacci(50) for number in first_50_fib_numbers: print(number)When you run this program, it will generate and print the first 50 numbers in the Fibonacci sequence. Each number in the sequence is the sum of the two preceding ones, starting from 0 and 1.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.