Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help with this coding!! This is python 1. Write a function calc_tax(in_file, out_file) that takes two string parameters: 1. in_file - name of
I need help with this coding!! This is python
1. Write a function calc_tax(in_file, out_file) that takes two string parameters: 1. in_file - name of a file to read 2. The input file contains lines with the following format: id amount tax__rate id is a record identifier that can be ignored tax_rate is the rate at which we will tax the amount and write the result to the output file. 4. The tax is simply amount * tax_rate See two_files_demo.py for an example of how to open 2 files using the with command. If you choose to not use the with command, remember to close both files. For testing purposes, the homework template file has a function named show_file. You can use it in your testing but don't change it as my tests need itStep 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