QC The Amount of Money Invested in Three Different Stocks Question
Description
Question:
– Five friends invested some amount of money in three different stocks.
– The amount of money each friend invested is given in the file InvestedAmount.tsv
– They invested 40% of their money in Tesla, 40% in Apple and 20% in Google stocks.
Task:
1. Read the Tab-Separated input file InvestedAmount.tsv
2. Calculate how much money each friend invested in each company. For example. Adam invested 16K in Tesla and Apple and 8K in Google.
3. Save the amount invested by each friend in a new csv file (stocks.csv) . The output file format may look like below.
Name,Tesla.Apple,Google
Adam,16000,16000,8000
Nicolas,20000,20000,10000
…
…
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."