Computer Science, asked by habibetharia8044, 10 months ago

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).

Answers

Answered by anamkhurshid29
2

HEYA MATE YOUR ANSWER IS

n=2×10-1

n=19

HOPE THIS HELPS ❤️

PLEASE MARK AS BRAINLIEST ❤️❤️

Answered by mindfulmaisel
0

PYTHON PROGRAM - To create a function of double factorial (n) that takes an odd integer and returns the product of all odd values up to the value n , where n = 2 k-l

Explanation:

CODE:

def doublefactorial(n):

  sum=0

  if(n%2!=0):

      for i in range(1,n+1,2):

          sum=i+sum

      print("The sum of odd number is:",sum)

  else:

      print("The number is even")

a=int(input("Enter an number:"))

doublefactorial(a)

OUTPUT:

Enter an number:19

The sum of odd number is: 100        

TO KNOW MORE ABOUT:

1.Write a Python program to calculate the amount (in Rs) each of them need to put in for the complete (both to and fro) journey.The program should also display True, if the amount to be paid by each person is divisible by 5, otherwise it should display False. (Hint: Use the relational operators in print statement.)Assume that mileage of the vehicle, amount per litre of fuel and distance for one way are given.

brainly.in/question/11759530

2.Write python program that accepts marks in 5 subjects and outputs average marks ..

Anyone here python expert tell me the answer please SPAM are not allowed✋✋✋❎❎❎

brainly.in/question/13526149

Similar questions