Python
Problem
Expected Duration: 3-6 hours
A comma-separated...
Computers and Technology, 10.04.2020 19:01 carlshiabrown
Python
Problem
Expected Duration: 3-6 hours
A comma-separated value file stocks_data. csv contains historical data on the Adjusted Closing Price for 3 stocks daily from Jan 2, 2009 to Dec 31,2018. The stocks are Apple (APPL), Microsoft (MSFT) and IBM (IBM).
A snippet from the data file looks like the following:
Symbol
Date
Adj. Close
MSFT
4/16/2014
35.807358
MSFT
6/21/2010
20.752356
IBM
2/10/2009
68.930023
AAPL
2/14/2018
164.227203
IBM
6/13/2017
141.24379
IBM
12/26/2017
142.835663
MSFT
4/1/2009
15.053272
AAPL
4/17/2009
15.445643
You can see that each row has a symbol, date and closing price, but the stock data is not sorted by symbol, date or price.
Your task has two main parts:
Part I
For each stock, print the following information to the console and to a text file called stock_summary. txt:
the max price and date it occurs
the min price and date it occurs
the average (mean) price
Part 2
Print to the console and append to the output file stock_summary. txt:
The stock among the 3 with the highest overall closing price and its date
The stock among the 3 with the lowest overall closing price and its date
Example output looks like the following:
AAPL
Max: price date
Min: price date
Ave: mean
IBM
Max: price date
Min: price date
Ave: mean
MSFT
Max: price date
Min: price date
Ave: mean
Highest: Symbol price date
Lowest: Symbol price date
Submission
Submit the source code for your program in Canvas as main. py, and your output file as stock_summary. txt. Submit these two in a file called stock. zip.
Be sure to use the file names specified here. No other names are acceptable.
Grading
Late submissions receive 50 points and no feedback.
0-20 points: design doc is correct and complete
21-100: all automated and manual tests pass
Tests
load data from csv input file
generate summary data for each stock (counts as 3 test cases)
compute the highest of all stocks
compute the lowest of all the stocks
use functions to minimize obvious repeated code
write output to file txt
writes output to console (same data and format as #6)
use loops in code
use appropriate modules and builtin functions to simplify code
code quality test passes with 0 errors
Points to Ponder
Thinking about files and the program:
What does your program do if the input file does not exist?
What does your program do if the output file does not exist?
What mathematical equations, forms or libraries did you use in your program?
If you worked on this program again, what would you do differently?
Answers: 1
Computers and Technology, 23.06.2019 02:50
Define a class named movie. include private fields for the title,year, and name of the director. include three public functions withprototypes void movie: : settitle(cstring); , voidmovie: : setyear(int); , void movie: : setdirector(string); . includeanother function that displays all the information about a movie.write a main() function that declares a movie object namedmyfavoritemovie. set and display the object's fields.this is what i have but know its wrong since it will notcompile: #include#includeusing namespace std; //class declarationclass movie{private: string movietitle ; string movieyear; string directorname; public: void settitle(string title); void setyear(string year); void setdirector(string director); void displayinfo(); }; //class implementationvoid movie: : settitle(string title){ movietitle = title; cout< < "what is the title of themovie? "< > temp; myfavoritemovie.settitle(temp); cout< < "enter movie year"< > temp; myfavoritemovie.setyear(temp); cout< < "enter director'sname"< > temp; myfavoritemovie.setdirector(temp); //display all the data myfavoritemovie.displayinfo(); system("pause"); return 0; this code is not entirely mine someone on cramster edited my firstcode but then i try manipulating the new code and i still get acompile error message : \documents\visual studio 2008\projects\movie\movie\movie.cpp(46) : error c2679: binary '< < ' : no operator found which takes aright-hand operand of type 'std: : string' (or there is no acceptableconversion)c: \program files (x86)\microsoft visual studio9.0\vc\include\ostream(653): could be'std: : basic_ostream< _elem,_traits> & std: : operator< < > (std: : basic_ostream< _elem,_traits> & ,const char *)w
Answers: 1
Computers and Technology, 24.06.2019 13:20
3. ranga ramasesh is the operations manager for a firm that is trying to decide which one of four countries it should research for possible outsourcing providers. the first step is to select a country based on cultural risk factors, which are critical to eventual business success with the provider. ranga has reviewed outsourcing provider directories and found that the four countries in the table that follows have an ample number of providers from which they can choose. to aid in the country selection step, he has enlisted the aid of a cultural expert, john wang, who has provided ratings of the various criteria in the table. the resulting ratings are on a 1 to 10 scale, where 1 is a low risk and 10 is a high risk. john has also determined six criteria weightins: trust, with a weight of 0.3; quality, with 0.2; religious, with 0.1; individualism, with 0.2; time, with 0.1; and uncertainity, with 0.1. using the factor-rating method, which country should ranga select? why? (2 points)
Answers: 3
Computers and Technology, 25.06.2019 02:30
On the pie chart below, which “slice” represents 30% of the budget?
Answers: 2
Computers and Technology, 25.06.2019 16:00
Which phrases/sentences correctly state the goals of business information management? multiple choice. john is a business information management professional in new york city. his job (includes regular travel). john has to (analyze business needs) regularly. a few months ago, john had to (manage work schedules in three projects at a time). however, his experience in information management him to manage each project effectively. he was also able to (analyze problems and implement possible business solutions). additionally, john was able to (achieve the corporate goals and manage business knowledge).
Answers: 1
Mathematics, 23.04.2020 10:27
Mathematics, 23.04.2020 10:43
Mathematics, 23.04.2020 10:43
Biology, 23.04.2020 10:43
Mathematics, 23.04.2020 10:44
Biology, 23.04.2020 10:44
Chemistry, 23.04.2020 10:44
Mathematics, 23.04.2020 10:45
Mathematics, 23.04.2020 10:45
Mathematics, 23.04.2020 10:45