Answered step by step
Verified Expert Solution
Question
1 Approved Answer
https: / / www . hackerrank.com / test / b 6 cens 9 fk 3 d / questions / 8 7 f 1 DSE FIFO
https:wwwhackerrank.comtestbcensfkdquestionsf
DSE FIFO Tax Calculator
Overview
Accounting systems do a lot of things, however one of their pri goals is to calculate profits for the purpose of taxes.
In this exercise you will build a basic accounting system which take a set of trades and calculate the tax owed for the year
Input and Output Specification
Your code should include a function which takes an ordered arr trade strings and returns the correct tax amount as a string in accounting notation.
Each trade is represented by a string with the following format:
Date YYYYMMDD
Ticker Symbol
Buy B Sell S indicator
Quantity
Price
Example list of trade strings:
AAPL,
AAPL,
AAPL,
AAPL,
AAPL,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started