MENU
Question -

Create a function doubleFactorial(n) that takes an odd integer and returns the product of all odd values upto the value n (where n=2k-l).



Answer -

def doubleFactorial(num):
product = 1
i = 0
k = 0
while k
k = 2*i+l
product * = k
i += 1
return product

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×