Skip to content

Commit 0af04d7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 37d25d0 commit 0af04d7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

dynamic_programming/lucas_function

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@ def lucas_func(n):
33
#PREDFINING THE VALUES
44
a = 2
55
b = 1
6-
6+
77
if n == 0:
88
return a
9-
10-
# GENERATING THE NUMBER
9+
10+
# GENERATING THE NUMBER
1111
for i in range(2, n + 1):
1212
c = a + b
1313
a = b
1414
b = c
15-
15+
1616
return b
17-
18-
# USER INPUT
17+
18+
# USER INPUT
1919
n = int(input("Enter the position n to find the nth Lucas Number: "))
2020
print(f"The {n}th Lucas Number is: {lucas_func(n)}")
2121

2222
"""
2323

24-
THE OUTPUT:-
24+
THE OUTPUT:-
2525
Enter the position n to find the nth Lucas Number: 6
2626
The 6th Lucas Number is: 18
2727

0 commit comments

Comments
 (0)