Horje
fiboacci in python Code Example
fiboacci in 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
extract name organization using nltk Code Example extract name organization using nltk Code Example
change a coolumn datatype in pandas Code Example change a coolumn datatype in pandas Code Example
Python Split list into chunks using lambda Method Code Example Python Split list into chunks using lambda Method Code Example
Passing array to methods Code Example Passing array to methods Code Example
what is tensor in deep learning Code Example what is tensor in deep learning Code Example

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