
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Write a Python program to create a batch file for 20 employees. Read Name, ID, weekly hours and rate per hour of 20 employees. Compute Gross Salary. If Gross Salary exceed $2500.00 then deduct 33% Tax; otherwise, deduct 24% Tax. Computer Tax and Net Salary. Write Weekly Hours, Rate per Hour, Gross Salary, Tax, and Net Salary of all employees in another batch file. Display all information of all employees. Make sure your program do the following:
- Create a file called txt.
- Type 20 employees’ information and save the file.
- Open the Original file as a read mode.
- Create another file through your program and call it txt
- Open the Copy file as a write mode.
- Read employee’s information from Original file one at a time.
- Calculate Gross salary, Tax, and Net salary.
- Write employee’s information in the Copy file.
- Once all records are read and written then
- Open the copy file as read mode.
- Read information from Copy file and Display them.
- Close Original file
- Close Copy file
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 4 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- The following is a sample of the order data (Customer#, Order#, OrderQty, UnitPrice) to be processed. Store the data in a text file named Order.txt. You may use Notepad to enter the data. 0155, 76533, 3, 10.950140, 75446, 12, 8.500150, 75550, 1, 89.950145, 75648, 25, 2.500130, 76360, 5, 17.90Create a form, ProcessOrder, that reads each order record, computes the extended cost, and displays Cust#, Order#, OrderQty, UnitPrice and ExtendedCost in a ListBox, with the columns aligned.arrow_forwardUsing Pythonarrow_forwardThe data in the left column is the data in a file. Write a Python program to read that data and print the data to the console in the format as shown in the second column. Use the first 2 records to test your code.arrow_forward
- Using the python code below. Identify the Variabale, Conditional Statement,Operators,Loops and Functions used in the code below. PYTHON CODE: file1 = open('database.txt', 'r') count = 0 name = [] age = [] dep = [] address = [] sr_code = [] status = [] condition = [] while True: count += 1 line = file1.readline() # if line is empty # end of file is reached if not line: break else: try: data = line.split(",") name.append(data[0]) age.append(data[1]) dep.append(data[2]) address.append(data[3]) sr_code.append(data[4]) status.append(data[5]) condition.append(data[6]) except: none = "" file1.close() def dataUp(): with open("database.txt", "w") as f: for i in range(0,len(name)): f.write(name[i]+","…arrow_forwardDesign a modular program in Python to process payroll for all hourly paid employees, save all the data into a text file and make a backup file as well. The program should allow user enter each employee's ID, name, hours worked, and hourly pay rate. And then calculate gross pay with overtime hours(hours beyond 40) paid 50% more. And then the program should display pay statement for each employee and store them into a same text file. The program should display total number of employees, total number of hours worked by all employees, and total gross pay and save them at the end of the same text file as well. The program should contain the following functions: main(), get_employee_info(), calc_gross_pay(hours, rate), display_pay_statement(emp_id, emp_name, hours_horked, hourly_pay_rate, gross_pay), save_pay_statement_to_file(file_object, emp_id, emp_name, hours_worked, hourly_pay_rate, gross_pay), save_summary_to_file(file_object, number_of_employees, total_hours_worked, total_gross_pay).…arrow_forward9b_act2. Please help me answer this in python programming.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education