Question: Programming Questions: Write out a function (in python) called windows that solves the following problem: After breaking tires, the bunnies have returned to wreak more

 Programming Questions: Write out a function (in python) called windows that

Programming Questions: Write out a function (in python) called windows that solves the following problem: After breaking tires, the bunnies have returned to wreak more havoc. They went to Ms. Li's apartment building and started to break the windows! Every apartment had 4 windows, however, now every 5th apartment only has 2 and all other apartments have 3 windows left. For example, for n = 6, there are 3 + 3 + 3 + 3 + 2 + 3 = 17 windows Your recursive function should only take in one parameter, the number of apartments (assume Ms. Li's building has an infinite number of apartments). Your main part of your program should have the user enter in the number of apartments and should also print the number of windows once computed recursively. Make sure to include header comments

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!