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
Working with text in presentation programs is similar to using text in other applications. True False
Yuliya22 [10]
I would say true because text is really important so you eant to make it look as good as possible.
8 0
3 years ago
Choose a firewall that is currently on the market and write a technical "sales pitch" to your classmates on why they should choo
stellarik [79]

Answer:

I would propose Comodo Firewall to my schoolmate. It is very easy to understand and have an appealing graphical UI. It gives the most significant level of security from dangers. It checks all the traffic going to the framework and leaving the framework. It quickly cautions you when there is any sort of suspicious action. There are no mind boggling design issues. It learns the conduct of the client to convey customized protection. It gives you the usefulness of Spyware filtering and infection checking in a single tick. There are a lot more functionalities that the firewall gives to its clients.

Explanation:

Choose a firewall that is currently on the market and write a technical "sales pitch" to your classmates on why they should choose the firewall you are selling.

I would propose Comodo Firewall to my schoolmate. It is very easy to understand and have an appealing graphical UI. It gives the most significant level of security from dangers. It checks all the traffic going to the framework and leaving the framework. It quickly cautions you when there is any sort of suspicious action. There are no mind boggling design issues. It learns the conduct of the client to convey customized protection. It gives you the usefulness of Spyware filtering and infection checking in a single tick. There are a lot more functionalities that the firewall gives to its clients.

3 0
3 years ago
Which access method would be most appropriate if your manager gave you a special cable and told you to use it to configure the s
GrogVix [38]
Console Port Method

Connecting a computer to a Cisco device through the console port requires a special console cable.
8 0
3 years ago
Consider the following class interfaces:
o-na [289]

Answer:

class teacher and student I didn't actually read it but I think it is class student

6 0
3 years ago
One of the greatest benefits of dual enrollment courses is that students can receive:
Vika [28.1K]
I think the answer to this is A
7 0
3 years ago
Read 2 more answers
Other questions:
  • Write thanks to the IT teacher at the end of grade 5
    7·1 answer
  • You have just replaced the NIC on a server, making no other changes. It can communicate with all the computers on its network bu
    14·1 answer
  • What were the goals of the “paperless society” ideal?
    14·2 answers
  • For the preceding simple implementation, this execution order would be nonideal for the input matrix; however, applying a loop i
    6·1 answer
  • What are the programming concepts (within or outside the scope of IT210) that you would like to strengthen and delve into furthe
    11·1 answer
  • Tell me the most scariest website you know and i'll give you brainlest
    5·1 answer
  • Exercise 3.6.9: 24 vs. "24"5 points
    7·1 answer
  • Algorithm and flowchart to find the perimeter and area of square​
    15·1 answer
  • What problems do you see in the process of transacting business online
    10·1 answer
  • Cybersecurity breaches in the workplace generally happen because _____. Select 3 options. people deliberately try to hack into t
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!