if __name__ == "__main__":
limit = int(input("How many terms to include in Lucas series:"))
print("Lucas series:")
for i in range(limit):
print(recur_luc(i))
After Change
from doctest import testmod
testmod()
n = int(input("Enter the number of terms in lucas series:\n").strip())
n = int(input("Enter the number of terms in lucas series:\n").strip())
print("Using recursive function to calculate lucas series:")
print(" ".join(str(recursive_lucas_number(i)) for i in range(n)))
print("\nUsing dynamic function to calculate lucas series:")