Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question

USING PYTHON Programming 3!!! Do not use many built in functions, mainly loops, and list manipulations (i.e. slicing etc)

We have a list of integers, representing the yearly profit (in kilo euro) of n businesses (shops) along the high street in the City centre. This time we are being given 4 (four) businesses ("for free"), that neighbour one another. The problem is to calculate which 4 we should take (that neighbour each other) to maximize our yearly profit.
Given these numbers, write a PYTHON program to calculate that 4 we should take. As in-

If the profits were 52, 67, -8, 43, -20 we should take the first 4 businesses.

If the profits were -20, 36, -10, -30, 3, 21 we would take no business (this is also allowed).

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9718874

Have any Question?


Related Questions in Computer Engineering

Question suppose you wanted to implement a new routing

Question : Suppose you wanted to implement a new routing protocol in the SDN control plane. At which layer would you implement that protocol? Explain. The response must be typed, single spaced, must be in times new roman ...

Question suppose we are given a chain of n nodes as shown

Question : Suppose we are given a "chain" of n nodes as shown below. Each node i is "neighbors" with the node to its left and the node to its right (if they exist). An independent set of these nodes is a subset of the no ...

Question you will submit a business case proposal which is

Question: You will submit a Business Case Proposal, which is a summary of your selected business case for the course project. The business case proposal will be submitted as a Word document and in paragraph form. This bu ...

Discuss why a financial services organization would benefit

Discuss why a financial services organization would benefit from using one framework over another (COSO, COBIT,) -- choose a framework or frameworks that in your opinion would be most ideally suited for such an organizat ...

The gravitational attraction between any two objects in the

The gravitational attraction between any two objects in the universe is given by the following formula: Force of Gravity = (G * m * n) / r 2 Where  m  and  n  are masses of the objects in kilograms,  r  is the distance b ...

A student finds that 2496g of water at 249 ordmc density

A student finds that 24.96g of water at 24.9 ºC (density= 0.9971 g/cm3 ) is required to completely fill an empty flask. The water is removed and completely dried; granular solid copper weighing 51.24g is then added to th ...

Question what is the relation between virtual memory a

Question : What is the relation between virtual memory, a memory map, physical memory and swapping to secondary memory? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow ...

Suppose mpc is 07 government spending increases by 10

Suppose MPC is 0.7. Government spending increases by $10 billion, and taxes decrease by $5 billion. How would the following items change, and by how much? Disposable income Private saving Public( Government) saving Equil ...

Suppose youve designed a mips processor implementation in

Suppose you've designed a MIPS processor implementation in which the stages take the following lengths of time: IF=20ns, ID=10ns, EX=20ns, MEM=35ns, WB=10ns. What is the minimum clock period for which your processor func ...

A federal agency responsible for enforcing laws governing

A federal agency responsible for enforcing laws governing weights and measures routinely inspect packages to determine whether the weight of the content is at least as great as that advertised on the package. A random sa ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As