medium
Python Fibonacci Sequence
Generate a Python script that calculates the Fibonacci sequence up to a specific number.
📝 Promptens innehåll
Write a Python function called generate_fibonacci that takes an integer n as an argument. The function should return a list containing the first n numbers of the Fibonacci sequence. Include error handling to ensure n is a positive integer and add comments explaining the logic.