1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anton [14]
2 years ago
14

The Payroll Department keeps a list of employee information for each pay period in a text file. The format of each line of the f

ile is the following: Write a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period. The report should be in tabular format with the appropriate header.
Computers and Technology
1 answer:
user100 [1]2 years ago
8 0

Answer:

import pandas as pd

filename = input("Enter file name with the extension included: ")

data = {}

with open("filename", "r") as file:

   content = file.readlines()

   for line in content:

       line_list = line.strip().split(" ")

       data[line_list[0]] = line_list[1] * line_list[2]

       del line_list

report = pd.DataFrame(list(data.items()), columns = ["lastname", "wages paid"])

print(report)

Explanation:

The python module prompts the user for the file name and opens the text file to extract the employee data with the python open function. It iterates over the file content and saves the last name and the wages paid to the employees ( the hours worked multiplied by the hourly rate) in the dictionary "data".

The dictionary is converted to a dataframe with the Pandas python package and displays the data in tabular format on the screen.

You might be interested in
IRQ 0 interrupt have _______________ priority<br> ? low<br> ? medium<br> ? highest<br> ? lowest
tekilochka [14]

Answer:

Highest

Explanation:

A interrupt request / IRQ is in which instructions are sent to Cpu and uses an interrupt handler to run distinct program . Hardware interrupts are used to manage occurrences such as obtaining modem or network card information, important presses, or mouse motions.

  • Interrupt request 0. – it is a system timer (can not be altered)
  • Interrupt request 1 – keyboard controller (can not be changed)
  • Interrupt request 2 – cascaded IRQ 8–15 signals (any device configured to use IRQ 2 will genuinely use IRQ 9)
  • Interrupt request 3 – serial port 2 controller
  • Interrupt request 4 –  serial port 1 controller
  • Interrupt request 5 –parallel port 2 and 3
  •  Interrupt request 6 - floppy disk controller
  •  Interrupt request 7 –parallel port 1. If a printer is not present, it is used for printers or for any parallel port. It can also possibly be shared with a secondary sound card with cautious port management.

As interrupt number increases priority level decreases, Priority level 0 is the highest priority level .

4 0
3 years ago
Please Help!<br><br>in return brainliest and special thanks
arlik [135]
1. Option 3
2. Option 2
3. Option 3
8 0
3 years ago
What is the difference between a surge and a spike?
Anna [14]
D, I think. I may be wrong. Someone comment and tell me
3 0
3 years ago
A single instruction carried out by a computer is called a what?
pochemuha

Answer:

in computer science, an instruction is a single operation of a processor defined by the instruction set

Explanation:

if you need anymore help let me know :)

6 0
3 years ago
What two names are given to the blinking vertical line?
Paha777 [63]

Answer:

<u>see </u><u>below</u><u>:</u>

Explanation:

One is (the cursor).

Whenever you see a flashing vertical line called-the cursor--you can start typing.Note that the mouse pointer is also called a cursor,but it is shaped differently.The keyboard cursor is also called the insertion point.

5 0
3 years ago
Other questions:
  • The item in this illustration that is highlighted is the _____. quick access tool bar view buttons status bar zoom control
    10·2 answers
  • What software refers to the on authorized and illegal duplication or sale of software
    10·1 answer
  • This is the main work area of your computer.
    7·1 answer
  • What is a independent variable
    11·1 answer
  • Hard light is usually not good for filming. True False
    11·2 answers
  • Lifelong learning _____. is only important for professionals with advanced degrees can be formal or informal includes formal cla
    12·1 answer
  • You need to update both the DEPARTMENT_ID and LOCATION_ID columns in the EMPLOYEES table using one UPDATE statement. Which claus
    5·1 answer
  • When entering information for a new contact in the address book, Outlook will automatically create a _____. A. Invitation B. Res
    7·1 answer
  • WHATS YALL FAVORITE GAME WHOEVER GIVES THE BEST ANSWER WINS 200
    13·2 answers
  • Computers that are joined together are called networks true or false
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!