How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask R.R. Jha Your Own Question

R.R. Jha
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5471
Experience:  B.Tech
20870358
Type Your Homework Question Here...
R.R. Jha is online now
A new question is answered every 9 seconds

recursive function

This answer was rated:

(q1) Write a recursive function called power_of_2 that takes as parameter a number N and returns 2N. Use the fact that 2N is 2 multiplied by itself N times. DO NOT USE THE ** operator!


(q2) Write a recursive function called square_sum that takes a parameter a number N and returns the sum 12 + 22 + 32 + ... + N2.


(q3) Write a recursive function called listProd for the following problem: You are given as inputs: a list L of numbers, and a number N (which is the length of the list); need to compute and return the product of all the numbers in the list (that is L[0] * L[1] * L[2] * ... * L[N-1]).

Hi,

When do you need them ?

Thanks
Customer: replied 3 years ago.

Hi,


 


I need them as soon as possible please.


 


Thanks


 

Ok, i can write the formulas , is that ok ?

Customer: replied 3 years ago.

can't you write the whole 3 programs ?


I want to run the programs in my computer

I do not know which languaje are you using

I can give you the math formulas

Customer: replied 3 years ago.

I want to write these 3 programs in PYTHON.

I do not know about it, maybe if you can give me some example i can try

Customer: replied 3 years ago.

I need an expert in computer programming --- python !!

 

 

  • Write a recursive function called power_of_2 that takes as parameter a number N and returns 2N. Use the fact that 2N is 2 multiplied by itself N times. DO NOT USE THE ** operator!
  • Write a recursive function called square_sum that takes a parameter a number N and returns the sum 12 + 22 + 32 + ... + N2.
  • Write a recursive function called listProd for the following problem: You are given as inputs: a list L of numbers, and a number N(which is the length of the list); need to compute and return the product of all the numbers in the list (that is L[0] * L[1] * L[2] * ... * L[N-1]).
Hello,

I'm RRJha and I'd be glad to help with your question. I'll write a program with these three functions and send to you soon.

Thanks
Customer: replied 3 years ago.

Hi RRJha,


 


Can you please tell me when will you approximately finish the program ?


Like how long do you need to finish it ?


 


I'm waiting for your response.

It would take 15 minutes or so. I'll get back to you asap.
Customer: replied 3 years ago.

Thank you very much.


 


I will wait for your response.


 


Good luck.

Let me know which version of python are you using.
Customer: replied 3 years ago.

it's PYTHON 2.7.5

THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5471
Experience: B.Tech
R.R. Jha and 4 other Homework Specialists are ready to help you
Were you able to retrieve it? You can open it in any text editor to view the code, or open in Python GUI and run the program.
Thanks for the bonus.

Let me know anytime you need help with other questions. Just add 'For RRJha' at the start of your question and I'll get back to you.

Related Homework Questions