Write a Python program to get the Fibonacci series between 0 to 30


Introduction

Write a Python program to get the Fibonacci series between 0 to 30. I have used python 3.7 compiler for debugging purpose.


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

  1. num,y=0,1
  2.  
  3. while y<30:
  4. print(y)
  5. num,y = y, num+y
  6.  

Result

python language techstudy.org

     





Related Topics




Popular Posts