Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

https: / / www . hackerrank.com / test / b 6 cens 9 fk 3 d / questions / 8 7 f 1 DSE FIFO

https://www.hackerrank.com/test/b6cens9fk3d/questions/87f1
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 201
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 (YYYY-MM-DD)
Ticker Symbol
Buy (B)/ Sell (S) indicator
Quantity
Price
Example list of trade strings:
2015-01-03,AAPL,B,50,80.0
2015-01-05,AAPL,B,60,100.0
2015-02-05,AAPL,S,70,130.0
2015-02-08,AAPL,S,10,90.0
2015-03-10,AAPL,S,80,120.0
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago