gpt-4-1106-preview· openai
Suzhen/CodeChat
START OF PREVIOUS DISCUSSION END OF PREVIOUS DISCUSSION
- User
START OF PREVIOUS DISCUSSION END OF PREVIOUS DISCUSSION user: make a pythons cript to print fibonnanci numbers
- Assistant
Here's a simple Python script that prints Fibonacci numbers. A Fibonacci number is either number 0 or 1, or the sum of the two previous numbers.
def fibonacci(n): a, b = 0, 1 for _ in range(n): print(a, end=' ') a, b = b, a + b print("How many Fibonacci numbers to generate?") num = int(input()) fibonacci(num)When you run this script, it will ask for the number of Fibonacci numbers you would like to generate, and then it will output them in a sequence, all on the same line. If you would prefer to have them printed on separate lines, you can replace
print(a, end=' ')withprint(a)instead.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →
- gpt-4-1106-previewCompare side by side →