Computer Science, asked by TechExplorer, 16 hours ago

how to print fibonacci series using while loop in python?

pls don't spam, tell only correct answers

Answers

Answered by visankreddy
1

Answer:

Fibonacci Series In Python | Python Program To Print Fibonacci...

  1. INPUT FORMAT: Input consists of an integer.
  2. OUTPATIEN FORMAT:
  3. SAMPLE INPUT: 7.
  4. SAMPLE OUTPUT: 0 1 1 2 3 5 8.
  5. PREREQUISITE KNOWLEDGE:while loop in Python and Recursion in Python.
  6. Step 1:Input the 'n' value until which the Fibonacci series has to be generated
  7. .Step 3:while (count <= n)
  8. Step 5:Increment the count variable.
Answered by Bonani11
0

Answer:

While (0 < 4) is TRUE. So, Fibonacci Series program starts executing statements inside the while loop.

Within the while loop, we have If statement and the condition if (0 <= 1) is TRUE. So, Next = 0 and compiler exit from if statement block.

Print statement print(Next) print the value 0.

Lastly, i incremented to 1.

Similar questions