Horje
fabonacci series python Code Example
fabonacci series python
#Learnprogramo
Number = int(input("How many terms? "))
# first two terms
First_Value, Second_Value = 0, 1
i = 0
if Number <= 0:
print("Please enter a positive integer")
elif Number == 1:
print("Fibonacci sequence upto",Number,":")
print(First_Value)
else:
print("Fibonacci sequence:")
while i < Number:
print(First_Value)
Next = First_Value + Second_Value
# update values
First_Value = Second_Value
Second_Value = Next
i += 1




Python

Related
if the value is not in dict return default Code Example if the value is not in dict return default Code Example
matlab find 2d index Code Example matlab find 2d index Code Example
how to change speed in ursina Code Example how to change speed in ursina Code Example
mechanize python XE #28 Code Example mechanize python XE #28 Code Example
insert string into middle of list python Code Example insert string into middle of list python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8