Created
October 30, 2011 04:39
-
-
Save WanaByte/1325498 to your computer and use it in GitHub Desktop.
Stock Portfolio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AA 100 32.20 | |
IBM 50 91.10 | |
CAT 150 83.44 | |
MSFT 200 51.23 | |
GE 95 40.37 | |
MSFT 50 65.10 | |
IBM 100 70.44 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prices.dat | |
GOOG 509.71 | |
YHOO 28.34 | |
IBM 106.11 | |
MSFT 30.47 | |
AAPL 122.13 | |
SUNW 5.01 | |
AA 39.91 | |
CAT 78.58 | |
GE 37.38 | |
HPQ 38.15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write a program that reads the portfolio in portfolio.dat, the stock prices in prices.dat, and prints out how much the portfolio has increased or decreased. | |
Extra Credit: | |
Portfolio.dat and prices.dat both have a small number of stocks. At the meetup, a second set of files will have a much larger number of stocks to analyze. We'll use the comparison between both sizes to talk about writing code that is reusable and that scales to handle a larger number of inputs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment