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. Each line should contain an employee’s name, the hours worked, and the wages paid for that period.

Answers

Answer 1

Answer:

filename = input("Enter file name: ")

file = open("filename", "r")

while file:

   line = file.readline()

   print(line)

file.close()

   

Explanation:

The python source code prompts the user for a file name (file extension included), opens the file and reads the content of the file to the end, one line at a time, and prints it.

Note that the file is closed at the end of the program to avoid leakage.

Answer 2

The program illustrates the use of file manipulation.

File manipulations are used to read from a file, and also write into it.

The program in Python, where comments are used to explain each line is as follows:

#This gets the file name

fname = input('Enter input file name: ')

#This prints the output header

print('Name\t\tHours\t\tTotal Pay')

#This iterates through each line of the file

for line in open(fname):

   #This gets the text on the current line

   cline = line.strip()

   #If the text is not empty,

   if cline != '':

       #This gets the name, wage and time worked on that line

       (name, wage, time) = cline.split()

       #This converts the time to integer

       time = int(time)

       #This calculates the total pay

       totalpay = float(wage) * time

       #This prints the employee details

       print(name,'\t\t', time,'\t\t' totalpay))

Read more about file manipulations at:

https://brainly.in/question/10211834


Related Questions

not sure what this means.​

Answers

Answer:

should be text effects............

Text effective it’s not hard it’s easy

1. You are designing a program that will keep track of the boxes in a doctor’s office. Each box will have three attributes: date, contents, and location. Write a class that will consist of box objects.

Answers

Answer:

Public class Box

{

private String myDate;

private String myContents;

private String myLocation;

public class Box(String date, String contents, String location)

{

myDate = date;

myContents = contents;

myLocation = location;

}

}

Hope this is what you're looking for! If not, let me know and I can try to help more. :)

Each box will have three attributes: date, contents, and location. It is class box.

What is class box?

There is a method in the box class of this program. Box is a brand-new data type for the class.

Box is used to declare objects of this type as having double height; Class declaration just generates a template; it does not generate any actual objects. None of the objects of type are affected by this code. Box void volume

Therefore, Each box will have three attributes: date, contents, and location. It is class box.

To learn more about class box, refer to the link:

https://brainly.com/question/14427083

#SPJ2

BRAINLIEST

When using design templates, these elements will be determined for you.
bullets
background
color scheme
content
title
font

Answers

Answer:

background

color scheme

font

I think thats all

Explanation:

Please give me Brainly

When using design templates, the elements that will be determined for you are color scheme and background. The correct options are b and c.

What is designing a template?

The template is creating a document that has a copy of itself. Design templates are ready-made layouts and written materials that can be altered.  For example, if you have a template of office content, then you can use it for another word document. You don't have to start from scratch.

In order to maintain consistency among users and media, templates are frequently created to adhere to certain rules or specifications. You can make new templates for later use, or utilize pre-designed templates from template libraries and websites.

Therefore, the correct options are b, background, and c, color scheme.

To learn more about template, refer to the link:

https://brainly.com/question/28193778

#SPJ2

Which of this isn't one of the three types of cryptograph?

A. Vegenere
B. Symmetric
C. Asymmetric
D. Hashing

Answers

Answer:

A. Vegenere

Explanation:

I think it's spelled Vigenère, I might be wrong.

The three types of cryptograph are:

Symmetric Key Cryptography (Private/Secret Key Cryptography)

Asymmetric Key Cryptography (Public Key Cryptography)

Hash Function

____ a British mathematician devolved the concept of a programmable digital computer and worked with Ada Lovelace to design the first mechanical computer the Analytical Engine

A William Shockley

B Grace Hopper

C Charles Babbage

D Bill Gates

someone pls answer asap ​

Answers

Answer:

C: Charles Babbage

Explanation:

Charles Babbage

Charles Babbage (1791-1871), computer pioneer, designed two classes of engine, Difference Engines, and Analytical Engines.

The analytical engine is a comprehensive robotic computer system that's been fully programmed as well as automatically controlled, and the further discussion can be defined as follows:

The computer pioneer Charles Babbage (1791-1871), designed two engine classes, different engines as well as analytical engines.He was indeed the brain behind ideas and therefore is considered one of the best on two different computers.A British mathematician Charles Babbage has invented the notion of the digital programmable computer and has been working with Ada Lovelace to design an analysis engine's first machine.

Therefore, the final answer is "Option C".

Learn more:

brainly.com/question/23422991

Which of the following is an example of gameplay in a video game
A: the art of a game

B: the player interacting with the game world and game mechanics

C: the personalities of all the characters

D:all of the above

Answers

Answer:

the correct answer is B. the player interacting with the game world and game mechanics

What action demonstrates unethical behavior?
A.
working overtime
B.
completing your work ahead of time
C.
taking credit for another person’s work
D.
keeping a tab on your organization’s carbon footprint
E.
leaving office on time

Answers

Answer:

taking credit for another person’s work

Any illegal actions, such stealing or physically abusing employees, are unethical at work. Unethical behavior can be observed in a wide range of businesses and environments. Taking credit for another person’s work.

What is Unethical behavior?

When a person, a professional, or an industry acts in a way that is deemed unethical because it goes against social norms, that behavior is referred to as unethical behavior.

Politicians, businesses, professions, and individuals all have the potential to act unethically.

There are other instances of deliberate deception, but they serve as illustrations of how damaging deception can be when it is used to violate someone's rights or security.

Therefore, Any illegal actions, such stealing or physically abusing employees, are unethical at work. Unethical behavior can be observed in a wide range of businesses and environments. Taking credit for another person’s work.

To learn more about Unethical, refer to the link:

https://brainly.com/question/10174825

#SPJ2

Select the protocol data units.
1. Bit
2. Segment
3. Frame
4. Data
5. Spoof
6. Pin
7. Packet​

Answers

Answer: 4. Data 2. segment  7.packet 3.frame  1.bit

Explanation:

Answer:

segmet bit packet frame data

Explanation:

What are possible challenges of cyberbullying

Answers

Answer:

so,e challenges of cyber bullying is that,it could be a random person bullying u and u won't know who it is,another challenge of cyber bullying is that they can blackmail u or pretend to be u or threaten u

Answer:

Possible challenges of cyberbullying have to do with nonbelievers, or people who do not think cyberbullying is a real problem. Technology makes it hard to stop bullies, and some people do not want to take responsibility.

Which statement is true? Select 3 options.

A function must have a return value.
A function can use variables as parameters.
The definition of a function must come before where the function is used.
A function can have more than one parameter.
The definition of a function can come before or after it is used.

Answers

Answer:

A,C, AND E

Explanation:

i got it wrong for the anwser

The statements that are true are as follows:

A function must have a return value.The definition of a function must come before where the function is used.The definition of a function can come before or after it is used.

Thus, the correct options for this question are A, C, and E.

What is Function?

A Function may be defined as a kind of expression, rule, or law that significantly determines a relationship between one variable which is known independent variable and another variable which is known as the dependent variable.

Each and every function must possess a return value. Apart from variables, there are several other parameters on which functions have to be worked on. So, the definition of a function must exist prior to its utilization. However, the actual definition of function may also exist after its utilization as well.

Therefore, the correct options for this question are A, C, and E.

To learn more about Functions, refer to the link:

https://brainly.com/question/22340031

#SPJ2

you are working on creating a business document with two other co-workers. Based on just information, which of the following pre-writing strategies would be the best for you?(A.P.E.X.)

Answers

Brainstorming, Rationalizing, and Rough Drafts.

Which line is most likely an error? A-“hello” B-hello C-“100” D-100

Answers

Answer: I think it is c

Explanation:

The error is most likely C. Hello quoted is proper. ("Hello") Eliminate A. Hello is proper as well so eliminate B. Now, we are at C. I Believe this is the answer since it is 100 quoted ("100"). 100 quoted does not make since unless used in a sentence such as "I bought 100 apples today for a good price!" D cannot be the answer since it is 100 all by itself. Thus, your answer should most likely be C, "100".

look at the picture lol

Answers

Answer:

Zoom in more please and than i can help

Explanation:

Answer:

I would go with the first blue highlighted one... but i could be wrong

i hope i helped

if i didn't... i am sorry, i tried.

Collisions occur when one output is mapped to two inputs.

A. True
B. False

Answers

Answer:

true very true very true

Answer:

False

Explanation:

I honestly just guess ngl

but i believe it's right ;0

PLEASE HELP ME ASAP!!! Looking at the misty rain and fog (pictured above) Explain at least two defensive driving techniques you would utilize to adjust your driving and lower your risk?? ​

Answers

1.Slow down 2. Break earlier

What are the steps to customize a slide show?

Go to Slide Show tab, select Hide Slide, select the slides to hide, and save.
Go to Slide Show tab, select Set Up Slide Show, select show type Custom, and save.
Go to Slide Show tab, select Custom Slide Show, select slides to be shown, and save.
Go to Slide Show tab, select Custom Slide Show, select Record Slide Show, and save.

Answers

Answer: Third one

Explanation: I got it right

Answer:

Third one

Explanation:

agree and tell why becoming a priest/nun is an honorable job PLEASE ASAP​

Answers

As a priest or nun you are helping the community of people who you relate to. They do a lot of charity work also so you are making the world a better place. And if your religious you are in a career that helps you grow in your faith.

Choose all items that represent essential features of excellent navigation menu design.

uses clearly and simply labeled links

is consistently styled and located

contains a link to a site map

is intuitive and easy to use is available on all pages

in the site employs a drop-down list​

Answers

Answer:

A,B,D,E

Explanation:

Answer:

A- uses clearly and simply labeled links

B- is consistently styled and located

D- is intuitive and easy to use

E- is available on all pages in the site

How does Python recognize a tuple?

Answers

Answer:

Tuples can be recognized like this,

tuple = 'hello', 'world'

or tuples can be recognized like this

tuple = ('hello', 'world')

you can see the value of a tuple by simply printing it out like so,

print(tuple)

Answer:

Tuples can be recognized like this,

tuple = 'hello', 'world'

or tuples can be recognized like this

tuple = ('hello', 'world')

you can see the value of a tuple by simply printing it out like so,

print(tuple)

Explanation:

Historically, storytelling passed down the most important ideas about life, family, and society from generation to generation; today, we still learn through stories.
true
false

Answers

Answer:

first civilizations emerged around 3000 BC in the river valleys of Mesopotamia, Minoan, India, China, and Egypt.

Answer:

true

Explanation:

I just did the test

What are the steps to open the Custom AutoFilter dialog box?

Answers

Answer:

data, sort and filter, text filters

Explanation:

ed 2020

Answer:

data, sort and filter, text filters

Explanation:

What is the difference between soft copy output devices and hard copy output devices​

Answers

the output printed on the paper is called hardcopy output. some examples are printer and plotter.

the output produced on display screen and audio sound is called soft copy output. some examples are moniter and speaker.

The ideal hash function:

A. Should be unfeasible to find two inputs that map to the same output
B. Should be unfeasible to learn anything about the input from the output
C. Basically we don’t want people to figure out what was said
D. All the above

Answers

I believe the answer is A
Hope this helps

4.8 Code Practice: Question 1
Instructions
Write a for loop to print the numbers 5, 10, 15 … 75 on one line.

Expected Output
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75

Answers

I included my code in the picture below. Best of luck.

Loops are used to perform repetitive operations.

The for loop in Python is as follows:

for i in range(5,76,5):

   print(i,end =" ")

The syntax used for the range in for loop is: (start,end+1,increment)

The start represents the first value to be printed.

So: start = 5

The end represents the last value to be printed.

So: end = 75

Because the end value will not be inclusive, the value is incremented  by 1

The increment is 5

Read more about similar programs at:

https://brainly.com/question/21298406

Anyone have an answer for 4.9 lesson code practice

Answers

Answer:

loop

Explanation:

Answer:count

Explanation:

Which command is located in the Action Settings dialog box that allows a user to set a linked or embedded object as a trigger to perform an action?

Object action
Hyperlink to
Run action
Highlight click

Answers

Answer:

Object action was the answer.

Explanation:

Answer:

Object action is the answer

Explanation:

I got it right on the unit review

HELP ASPDrag the tiles to the correct boxes to complete the pairs.
Match the items with their respective descriptions.
organizes files
make files easily searchable
keeps track of file creation and modification dates
makes files easily accessible
file system on the computer
a list of sub-folders
a central location

Answers

The arrangement that comes first based on the table are:

make files easily searchable.organizes files. makes files easily accessible.keeps track of file creation and modification dates.

What is File Management?

A file is known to be the storage unit that can be seen in a computer. It saves all of the information, data, as well as others.

Note that in Organizing Files, one need to arrange files, folders, and sub-folders in a logical manner.

To make sure that there is easy accessibility of all files and folders, do choose a central location to organize all the files.

Therefore, The arrangement that comes first based on the table are:

make files easily searchable.organizes files. makes files easily accessible.keeps track of file creation and modification dates.

Learn more about File Management from

https://brainly.com/question/12736385

#SPJ1

Answer:

The arrangement that comes first based on the table are:

make files easily searchable.

organizes files.

makes files easily accessible.

keeps track of file creation and modification dates.

What is File Management?

A file is known to be the storage unit that can be seen in a computer. It saves all of the information, data, as well as others.

Note that in Organizing Files, one need to arrange files, folders, and sub-folders in a logical manner.

To make sure that there is easy accessibility of all files and folders, do choose a central location to organize all the files.

Therefore, The arrangement that comes first based on the table are:

make files easily searchable.

organizes files.

makes files easily accessible.

keeps track of file creation and modification dates.

Explanation:

Match the interface element with the corresponding examples. You will use the elements more than once.

Question 1 options:

List Boxes


Message Boxes


Accordion


Modal Windows


Search Field


Notifications


Buttons


Checkboxes


Tooltips

1.
Input Controls

2.
Navigational Components

3.
Informational Components

4.
Containers

(place each one of them under the 1.2.3.4 categories)

Answers

Answer:I’m nit sure sorry

Explanation:

..

Which of the following You tubers uses the word "flip" as a curse word

A. Unspeakable
B.09Sharkboy
C. Moosecraft
D. All of the above

First correct answer get brainiest!

Answers

All of the above cause it’s fliped

people can use social media responsibly by what​

Answers

Answer:

spread love not hate n password diligent

By limiting their time on social media

Explanation:

Other Questions
A fish is swimming at a vibrant rate toward the ocean floor. The equation y=-7x-3 can be used to represent this distinction, where y is the depth of the fish in meters below sea level and x is the number of seconds the fish has been swimming. Which statement best describes the depth of the fish,given this equation. A.From a starting position of 7 meters below sea level, the fish is descending 3 meters per second.B.From a starting position of 7 meters below sea level, the fish is ascending 3 meters per second .C.From a starting position of 3 meters below sea level, the fish is descending 7 meters per second. D.From a starting position of 3 meters below sea level, the fish is ascending 7 meters per second. Which organelle acts as the cells command center?-Nucleus-Ribosomes-clole-Chloroplasts-Lysosomes PLS help!!!!!!!!Why are halogen atoms never a central atom? Its 8:20, you add 175 minutes to the time. What time is it? which of the following best explains why a universalizing religion would diffuse into a region? please help asap!! thank you :) PLEASE HELP !!!!!!!!!!!!!!!!!!!!!!!!!!!!!Which of the following does NOT increase with increasing temperature? a kinetic energy b thermal energy c potential energy d none of the above Estefani gets out of the pool and the hot concrete burns her feet. What form of heat transfer is occurring between the contrete and Estefani's feet? Why are cause and effect graphic organizers useful?a.Because they show relationships among eventsc.Because they tell us what will happen in the futureb.Because they identify when time begand.All of thesePlease select the best answer from the choices providedABCD What is the indirect object in this sentence? The doctors gave him many tests of his intelligence. A. doctors B. him C. tests D. intelligence can someone help?? meeeee not thelp just whats the answer? (8x-3y)(8x+3y) solve the following Find the measure of the bolded arc. Round to the nearest hundreth. What is the goal of forensic photography? A. To sell a product B. To create art C. To record evidence D. To create a likeness of a person What equipment did Coronado's men have? plzzzz helpppp how did privateers help the americans in tbe revolutionary war Which one of these is not a successful budgeting strategy Solve for m. - 9/2 m = 27/2 Europen explorers from which country were the first to enter Georgia?-Spain-France-England -Portugal During World War II, many Mexican immigrants came to the United States as refugees from a communist revolution. as spouses of military personnel. as workers in the bracero program.