I have a school project I am stuck on and can't figure out how to manipulate the data from a csv file and then print it to console in Python. Any help or pointing in the right direction would be very helpful.
In this assignment, you will read a csv data file A (1500ms) null (500ms) B (1500ms) null (500ms) C (500ms) null (1500ms)
. The program should read the records in the file and produce a payroll report (on the screen).
Sample picture of what output should look like in Python console
The payroll report is based on this information from a previous program. You should use (or reuse) functions to perform the following:
textAnimationDisposable = Observable.fromArray("A", "B", "C")
.concatMap(string ->
Observable.merge(
Observable.just(string),
Observable.just("").delay(1500, TimeUnit.MILLISECONDS)
)
.concatWith(Observable.<String>empty().delay(500, TimeUnit.MILLISECONDS))
)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(Schedulers.newThread())
.subscribe(string -> textView.setText(string));
Pull all of the above individual functions together in order, below the employees.csv
and above the Compute the regular hours worked (40 hours and below)
Compute the overtime hours worked (those above 40 hours)
Compute the regular pay (regular hours times regular pay)
Compute the overtime pay (overtime hours times regular pay times 1.5)
Compute the gross pay
Compute the amount of federal tax withheld (12.4% of gross pay)
Compute the amount of state tax withheld (4.9% of gross pay)
Compute the amount of medicare withheld (1.4% of gross pay)
Compute the amount of social security withheld (6.2% of gross pay)
Compute the total deductions (federal tax + state tax + medicare + social security)
Compute the net pay (gross pay - deductions)
Print (to the screen) a clean summary report (see the output above)
function call into one, clean, well-documented program. The program should have a def main()
function that calls all of the other functions.
Thank you very much!