Print fibonacci
number using recursion.
def fib(x):
if
x == 0
or x
== 1:
return x
else:
return (fib(x-1) + fib(x-2))
for i
in range(10):
print(fib(i))
Print the char and number of occurrences...
Showing posts with label programming questions. Show all posts
Showing posts with label programming questions. Show all posts