def fib(num):
if num<=1
return num
return fib(num - 1) + (num - 2)
num = int(input("enter a number higher than 0: "))
print(fib(i))
Luxiaoxian
John_165 44 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.