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]
3 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]3 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
Please help will give brainliest
ludmilkaskok [199]

Answer:

waterfall- google search

Explanation:

5 0
3 years ago
Which of the following is NOT true about variables?
VikaD [51]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The value stored by a variable can be changed after it is assigned(true).

The value of a variable can be changed after it is assigned, for example:

int a=10;

and we can change the value of variable a in letter program such as:

a=15;

Variables are a name for a spot in the computer's memory (true).

it is true, because the variables value stored in the computer's memory and we can access theses values by their name (variable name). so Variables are a name for a spot in the computer's memory.

Variable names can be words: such as temperature or height (true).

Yes, the variable name can be words such as height, width, temperature etc.

The value stored by a variable cannot be changed after it is assigned (false).

It is noted that the value stored by a variable can be changed after it is assigned. However, it is noted that is some programming language, you can't change the value of static variable.

3 0
4 years ago
To what extent does w. e. b. dubois's argument still apply to the contemporary prison system?
fenix001 [56]

W. E. B. DuBois's "The Souls of Black Folk" is an important work that continues to resonate today. In it, DuBois argues that the black experience in America is fundamentally different from that of whites, and that this difference is the result of racism. He further argues that the black community must develop its own institutions and culture in order to thrive.

DuBois's arguments are as relevant today as they were when he wrote them. The contemporary prison system is a clear example of how racism continues to impact the lives of black Americans. Black people are disproportionately incarcerated, and the conditions in many prisons are abysmal. The lack of access to education and opportunities for rehabilitation means that many black Americans are effectively condemned to a life of poverty and despair.

DuBois's work is a call to action for black Americans to create their own institutions and to fight for their rights. The contemporary prison system is a clear example of how much work still needs to be done.

Learn more on black Americans here:

brainly.com/question/25102754

#SPJ4

3 0
1 year ago
A desktop computer (named workstation22) can’t connect to the network. A network card was purchased without documentation or dri
Lelechka [254]

Answer:

<em>The first step is to download the driver file from the Internet using  another Computer system, Copy the driver to a flash or CD then run the installation file on the Desktop Computer.</em>

Explanation:

<em>Driver files can be easily gotten from software sites online or from other secure websites, most times you have to pay for these driver files in some sites for secure and authentic download.</em>

<em>it is very necessary  that the user takes note of the exact system name, model and system architecture with respect to when downloading the driver file.</em>

4 0
4 years ago
The relational algebra expressions can be rearranged and achieve the same result but with a better processing time. A selection
BigorU [14]

Answer:

c. This would reduce the number of tuples to involve in the join resulting in a more efficient query.

Explanation:

SQL or structured query language is a database querying language used to communicate or interact with databases. A database query could be as simple as returning all the columns from a database table to complex like joining several query results which in turn forms an algebra expression.

Every query statement or expression is executed with time, execution time needs to be minimized for efficiency, so, a well-arranged and reduced joining in the query improves the efficiency of the query.

8 0
3 years ago
Other questions:
  • The binary search algorithm ________. will have a maximum number of comparisons equal to the number of elements in the array wil
    7·1 answer
  • Describe in detail how to determine if a source is credible when conducting research. Justify your response using two or more co
    8·1 answer
  • which of the following scenarios is a circumstance in which it would be ethical to practice confidentiality?
    8·1 answer
  • After installation of SSL certificate website asking for username and password.
    6·1 answer
  • When conducting research on the internet, what is a starting point for determining how to start the research?
    5·1 answer
  • You and a few friends are having a meal at a pizza restaurant, and the server has just given you the bill. Write a function that
    14·1 answer
  • Which of the following are activities that today’s companies would perform?
    5·1 answer
  • What are three recommendations for reducing risk and improving the privacy of your personal information while using social media
    13·1 answer
  • Which of these is an example of collective voice?
    8·2 answers
  • Question 22 of 25
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!