OpenSourceCornell / Spring_2018_WICC_OSC

The Git Workshop for the Spring 2018 WICC and Open Source Cornell Introduction to Open Source event.
1 stars 21 forks source link

stocks #48

Open alexanderGGreenberg opened 6 years ago

alexanderGGreenberg commented 6 years ago

Implement the funciton in src/stocks.py with the following specification:

In order to make seven figures as a college student you've decided to pick up the fine profession of trading stocks! Your objective is, given a list of historic stock prices and a bank account balance, to return a list containing the price that you should have bought and then sold the stock, and an empty list if you cannot afford the stock. Example input: [9.5, 3.4, 3.3, 5.6, 7.0] and 50 Example output: [3.3, 7.0] Assume no prices are repeated