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

What refers to the way players get personally involved in a game, with the ability to influence the outcome?
ludonarrative
interactive fiction
participant observation
player agency

Answers

Answer:

player agency

Explanation:

Answer:

I think it's player agency

Explanation:

Player Agency: The player's ability to impact the story through the game design or gameplay

Which of the following is NOT a correct variable assignment?
O test = 98
Oname = "Ada"
O x = x + 1
O 5+ y = x

Answers

So the bottom ones such as x = x + 1 and 5 + y = x are incorrect because there not being initialized with any value. You can’t make a variable and say x = x + 1 without defining what x is.

Variables are simply the names given to memory location.

The incorrect variable assignment is (d) 5 + y = x

To assign a value to a variable, we make use of the following syntax:

variable = expression/value

The above syntax means that:

The variable will be on the left-hand side, while the values or the expressions will be on the right-hand side

Using the above highlights as a guide, we can conclude that:

(d) 5 + y = x is not a correct variable assignment

This is so because, it does not conform to the syntax of variable assignment

Read more about variable assignments at:

https://brainly.com/question/18522561

why is it important to write something in the subject line of emails?

Answers

so the person can know what you want and it helps keep better track of emails and subject matters

Answer:To provide a topic for whatever is in your email

Explanation: without something in the subject line the email will most likely be inferred as a spam.

Do you guys know if there's a way for me to find a Google doc that I typed but forgot to save if you do it for points i will report please don't make me

Answers

Answer:

Usually, Google Docs save automatically. If you remember some keywords that you typed, try searching for it. For example, if you typed up a report about dogs, search "dogs" when you're on the Google Docs home screen.

Explanation:

If this doesn't help, leave a comment and I'll try to help more!

Answer:

if you remeber the name of the doc you wrote you can just search for it in google doc. google doc saves what you write so it should be in there

Explanation:

URGENT!!!!15POINTS AND BRAINLIEST
Type the correct answer in the box. Spell all words correctly.
In a hydraulic jack, the pipe below the load has an area of 5 m2, and the pipe through which the input force transmits has an area of 1 m2. Calculate the force required.

kN of input force is necessary to balance a load of 10,000 N.

Answers

Answer:

0.2kN

Explanation:

An hydraulic jack works by the principle that pressure applied to one part in an enclosed liquid is transmitted equally in all parts of the liquid. this is in accordance with Pascal's principle.

Pressure= Force/Area

P=F/A

Pressure due to the load= Pressure due to input force for the system to be in balance.

Let force due to load be F₁, input force be F₂, Area at the load piston be A₁ and the area of the pipe through which the input force transmits be A₂, then,

F₁/A₁=F₂/A₂

10000N/5m²=F₂/1m²

F₂=(1000N×1m²)/5m²

F₂=200N

=0.2kN

Please Help!

Choose all items that are characteristics of placing nested elements on a new line, using indentation.


A) makes HTML errors difficult to find

B) not required by a web browser

C) can cause web page display errors

D) makes HTML analysis and repair easier

E) done automatically by HTML authoring software

Answers

Answer:

Its B,D,E

Explanation:

Got it right on e2020

Answer:

B). not required by a web browser

D). makes HTML analysis and repair easier

E). done automatically by HTML authoring software

Btw cause this class can be a pain here are the answers to the rest of the assignment.

Slide 7/12:

The missing element is

C). <p></p>

Slide 9/12:

The missing tag is:

B). an end (closing) a tag

Slide 12/12:

The missing character is

D). an angle bracket

Explanation:

I just did the Part 3 on EDGE2022 and it's 200% correct!

Also, heart and rate if you found this answer helpful!! :) (P.S It makes me feel good to know I helped someone today!!)

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

what is a cloud in the world of computing

Answers

Answer:

In the simplest terms, cloud computing means storing and accessing data and programs over the internet instead of your computer's hard drive

Explanation:

What do you do when you have computer problems? Check all that apply. PLEASE HELP

Answers

Answer:

I ask my parents or call someone

Can you put the answers to the problem it would be a lot easier for me


And I would look up how to fix the problem on my own before paying someone....

most 4 year colleges want an applicant's scores for all the following except

Answers

Answer:

IQ

Explanation:

HELLO!!!! For instance, will we get an error if we put a space after the word “print” and before the opening parenthesis in python? With explantion.

Answers

In python, spaces in the sense you're talking about, dont matter. For instance,

print ( "hello") will run the same as print("hello")

But, you cannot put a space before the print statement. That's called indenting. You are only supposed to indent code that is inside loops, if-elif-else statements, and functions.

Which is the fastest way to make many formatting changes to a range of cells?
select each cell, right-click, use the ribbon to make changes
select the range, right-click, use the ribbon to make changes
select the range, right-click, format cells, make changes
select each cell, right-click, format cells, make changes

Answers

Answer:

c 3

Explanation:

c 3

Answer:

I believe it could be C

Explanation:

Please click "Thanks" if this helped in any way! :)

What is the MINIMUM number of paths that would need to be broken to prevent Computing Device A from connecting with Computing Device E? a) 1 b) 2 c) 3 d) 4

Answers

Answer:

The answer is "Option c".

Explanation:

In the given question the device A is connected by 3 wires, contributing all of them, which also includes several connector paths. When all the wires of A are broken down, and if all of this leaves no routes that can be used. Even so, if it is done to E, it's also linked to four different routes. Its solution would've been C because its value will be the MINIMUM.

Answer:

c

Explanation:

What involves the layering of hardware and software into a coherent computer experience?

A) PaaS

B) Cloud

C) IaaS

D) Open Systems Interconnect

Answers

Answer:

Answer is D. Open Systems Interconnext

Answer:

D open Systems Interconnect

Explanation:

Got it right on the test.

Complete answers for the test on edge 2021...

#1. a - application performance

#2. c - protocol

#3. b - virtual machines

#4. b - open systems interconnect

#5. b - post office

Got 100% on the test.

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

PLEASE ILL MARK BRAINLIEST
A ____ is a distinctive characteristic of a virus or virus family.
(this is computer stuff)

Answers

Answer:

it is a capsid

any song recommendations, pls dont say 6ix9ine or lil pump

Answers

I actually do have one tho. Try Megan Tha Stallion.

Answer:

smash mouth "all star" is my fave or Imagine Dragons "Whatever it Takes"

Explanation:

PLEASE HELP!!! WILL MARK BRAINLIEST!!
Why do you think Phones/Devices have upgraded over the years

Answers

Answer:

Too improve the technology

Explanation:

Answer:

phones and other devices have been upgraded over time because technology has advanced and people have found a need for better communication as the world has evolved

Part B
How would you classify a network formed by connecting two MANs together?
В І у хх Font Sizes А • А

Answers

Computer programming 2254518752669

___________ are representations of actual objects. a. symbols b. models c. handouts d. notecards

Answers

Answer:

Models is the answer!!!

Answer:

B. Models.

Explanation:

Got it right on the test

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.

According to the video, what are some qualitites Clergy need? Check all that apply.

Answers

Answer:

honesty in communication and in relationships hope it helps. :)

Explanation:

Answer:

honesty and communication in a relationship

Explanation:

hope this help and have a blessed day

How do open online courses help with independent learning

Answers

Answer:

One of the most powerful benefits of online courses is that they enable students to learn at the time, place, and pace that best suits their individual learning style. ... If there is a class discussion, you can take time to gather your thoughts rather than be in a race to get the teacher's attention.

Explanation:

Answer:

you can take time to gather your thoughts

Explanation:

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

_________ is the primary measurement used to gauge your typing ability

Answers

Answer:

Words per minute

Explanation:

Rayna wants to create an organizational chart in her document. Which of the following commands should she click in the Illustrations group?

Chart

Media

Screenshot

SmartArt

Answers

CHART
that’s my answer

Answer: Your real answer is SmartArt

Explanation:

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

Answer:

c = 1 # global variable

    jhjl jh

def add(): c = 1 # global variable

def add():

   print(c)

add()

   c = c + 2 # increment c by 2

   print(c)

add()

Explanation:

Answer:

for x in range(1, 16):

   print(x * 5, end=" ")

Explanation:

Hope this helps!

HELP ASAP!!!
Write a program that asks the p34won to enter their grade, and then prints GRADE is a fun grade. Your program should repeat these steps until the user inputs I graduated.

Sample Run
What grade are you in?: (I graduated) 1st
1st is a fun grade.
What grade are you in?: (I graduated) 3rd
3rd is a fun grade.
What grade are you in?: (I graduated) 12th
12th is a fun grade.
What grade are you in?: (I graduated) I graduated

It's in python

Answers

def func():

   while True:

       grade = input("What grade are you in?: (I graduated) ")

       if grade == "I graduated":

           return

       print("{} is a fun grade".format(grade))

func()

I hope this helps!

NEED HELP ASAP!!!!!!!!!!

Which of the following demonstrates the difference between disk copying and disk imaging?
A) Disk copying moves the entire contents of one disk to another whereas disk imaging creates a compressed file for backup
B) Disk copying creates a compressed wile for backup whereas disk imagine moves the entire contents of one disk to another
C) Disk copying only records and stores
another disks auditory data whereas disk imaging only records and stores another disk's
VISUS data
D) Disk copying only records and stores another disks visual data whereas diskirmaging only records and stores another disk's
auditory data

Answers

Answer:

A

Disk copying moves the entire contents of one disk to another whereas disk imaging creates a compressed file for backup

Explanation:

What is the difference between myList.length and myList.length - 1? When would you use myList.length? When would you use myList.length - 1?

Answers

Answer:

The difference between myList.Length and myList.length - 1 is that with the second variable, you are subtracting 1 from the total (assuming it is a integer)

Explanation:

Assuming the variable myList.Length is a integer, like for example, 4, it would be equal to 4, while myList.Length - 1 would be 3.

Other Questions
Solve -11h 27 16h for h.Group of answer choicesh -1h -1h 5/27h 5/27 How to do this question plz answer Giving brainlest and ALL OF THE answers are can and cannot how do i do this question In a certain town there were 400 robberies last year. This year the number of robberies has gone down 27%. How many robberies were there this year, to the nearest whole number? find the 8th term of the geometric sequence 4, -20, 100, ... What is the expanded form of 720.058 What does it mean for a source to be reliable?(1 point)It is published on the internet.It is trustworthy.It took a long time to write. It cites at least one source.When researching the topic of "performance enhancement equipment in competitive sports," which source is most likely to be trustworthy?(1 point)a survey of fifteen physical education teachersthe opinions of five baseball coaches a survey of eight professional athletic organizations the opinions of ten basketball playersVivian is researching the topic of listening to music while studying. Vivian finds that Text 1 is more trustworthy than Text 2. Which piece of information is likely to be found in Text 2?(1 point)the results of a study published in a scientific journal about the effects of music on concentrationthe results of a survey of 1,000 college students about their grades and study habitsa story about a teenager who improved his grades by listening to classical music while he studiedan interview with a doctor who specializes in memory and works with teenagersWhat is a sign that the source you are reading might be unreliable?(1 point)It is trying to sell a product. It includes facts verified by outside sources.It uses neutral language.It is created by a professional journalist. Caleb runs laps at the local track. The circular track measures 70 feet across its diameter. How many feet will Caleb run if he stays on the outer edge of the track? (Round to the nearest whole number.) Which three diagnostic services careers require four or more years of education and training?radiologic techniciansphlebotomistelectroencephalogram (EEG) Technicianradiologistclinical laboratory technologist express 1 as a percent John has gradually added time to his running routine to reach his goal of running a 5k. John has reached his goal of running a 5k without stopping. This achievement is an example of 2E What is the greatest whole number less than 1000 that: (1) can be expressed as the sum of two consecutive whole numbers, and (2) can be expressed as the sum of three consecutive whole numbers, and (3) can be expressed as the sum of five consecutive whole numbers The park district is starting a new softball league. The table showshow many coaches will be needed, depending on how manyplayers sign up.Players 20 35 50Coaches 4 7 10Using the proportional relationship in the table, how manycoaches will be needed for 80 players?A8162140 HELP ASAP PLEASEEEEEvaluate the expression: 73The solution is _____. Please help I dont understand this what further observation led mendeleev to create the periodic table the diagram shows two charged objects and be based on the field lines what are the charges of the objects I need help, please help me Asap!!! [IMAGE ATTACHED]Help me with the last box please