Computer Science, asked by krishkumarkeshri1234, 7 months ago

Define function in python modular programming ? explain its type.​

Answers

Answered by singhprince0457
1

Answer:

Explanation:

def fib(n):

   if n == 0:

       return 0

   elif n == 1:

       return 1

   else:

       return fib(n-1) + fib(n-2)

def ifib(n):

   a, b = 0, 1

   for i in range(n):

       a, b = b, a + b

   return a

Answered by aneesch13012
1

Explanation:

Modular programming is a software design technique that emphasizes Separating the functionality of a program into independent , interchangeable modules , such that each contains everything thing necessary to exe cute only one aspect of the desired functionality

i hope this answer help full tor youu

thnq

Similar questions