APlusGrades

Not Rated (0)

$15/per page/Negotiable

About APlusGrades

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing,Foreign Languages,Geography,Geology,Health & Medical,HR Management,Law,Management,Physics,Programming,Science,Statistics Hide all
Teaching Since: Jul 2017
Last Sign in: 364 Weeks Ago, 2 Days Ago
Questions Answered: 1850
Tutorials Posted: 1850

Education

  • Graduate in Biology and Nutrition, MBA Finance
    Florida State University
    Aug-2000 - Jul-2007

Experience

  • Ass. Relationship Manager
    Penn-Florida
    Mar-2009 - Feb-2016

Category > Programming Posted 16 Jul 2017 My Price 8.00

mport maxprofit information = [ [[8, 15, 17, 2, 1, 42, 26, 4, 41, 37, 44, 50, 43, 43, 6], [4, 11, 49]], [[50, 44, 20, 3, 8, 18, 31, 13, 9, 17, 38,

You should save the solution to this problem in a file called maxprofit.py if you wish to use the tester program. write a function called maxprofit that accepts a single list argument as input (referred to as mylist in this description). The function should determine the maximum profit that can be made by 'buying' a stock at one index in mylist and 'selling' it at a later index. In this case, you can calculate the profit of buying at index x and selling at index y as mylist[y] - mylist[x]. Note that the selling index must come after the buying index. Your function must return a list with the following 3 pieces of information: the buy index, the sell index, and the maximum profit. You may assume

 

 

that at least one combination of buy/sell prices that exist produce a positive profit. You can also assume that there will be only one maximum combination (i.e., no ties exist).

 

I wrote my code done but couldnt get the right answer through testfile can you check it for me ty:)

Answers

Not Rated (0)
Status NEW Posted 16 Jul 2017 11:07 AM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I

Not Rated(0)