About 157,000 results
Open links in new tab
  1. How do I print a fibonacci sequence to the nth number in Python?

    I'm thinking I could use separate functions but I can't figure out how to pass the argument that calculates the fibonacci sequence. Then the next step would be to to print out the sequence of …

  2. Python: Fibonacci Sequence - Stack Overflow

    Mar 9, 2013 · I'm just trying to improve my programming skill by making some basic functions. I want to fill a list with fibonacci values, but I think my code gives the sum of all the numbers put …

  3. Python : Fibonacci sequence using range(x,y,n) - Stack Overflow

    Jul 14, 2016 · It is more interesting to get the Fibonacci numbers up until a certain condition is met instead of an arbitrary numerical cutoff. For instance, the code below detects the first …

  4. Fibonacci sequence using list in PYTHON? - Stack Overflow

    3 I have a problem about making a fibonacci sequence to a list, I'm just new to python someone help me please. This is my code. I know this is looking wrong or something because it says …

  5. while loop - Fibonacci Sequence using Python - Stack Overflow

    May 8, 2013 · Hello I am trying to write a script that prompts the user for an integer number (n), then prints all the Fibonacci numbers that are less than or equal to the input, in that order. …

  6. Fibonacci Sequence In Python (Most Efficient) - Stack Overflow

    Feb 26, 2019 · Anyone know the most efficient way of displaying the first 100 numbers in the Fibonacci Sequence in Python please? Here is my current code: fib1,fib2,fib3= 0,0,1 while …

  7. Fibonacci numbers, with an one-liner in Python 3?

    I know there is nothing wrong with writing with proper function structure, but I would like to know how can I find nth fibonacci number with most Pythonic way with a one-line. I wrote that code, b...

  8. Python Fibonacci Generator - Stack Overflow

    Python is a dynamically typed language. the type of a variable is determined at runtime and it can vary as the execution is in progress. Here at first, you have declared a to hold an integer type …

  9. Recursive function in python for Fibonacci sequence

    Aug 4, 2023 · The problem comes when your code gets to the recursive call of fibonacci(2). Inside this call, it will then call fibonacci(1) and fibonacci(0). In the fibonacci(1) call, it will hit the if n …

  10. python - Efficient calculation of Fibonacci series - Stack Overflow

    Aug 11, 2013 · To find the sum of the first n even-valued fibonacci numbers directly, put 3n + 2 in your favourite method to efficiently compute a single fibonacci number, decrement by one and …