Skip to content

Commit e590457

Browse files
committed
initial commit
1 parent 29bf9b6 commit e590457

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fibonacci.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
# Program to display the Fibonacci sequence up to n-th term
22

3-
nterms = int(input("How many terms? "))
3+
nterms = int(input("No of terms ? "))
44

55
# first two terms
66
n1, n2 = 0, 1
77
count = 0
8-
98
# check if the number of terms is valid
109
if nterms <= 0:
1110
print("Please enter a positive integer")

0 commit comments

Comments
 (0)