subject

fileName = input("Enter the input file name: ") inputFile = open(fileName,'r') #add two new fields for output header.(Choose the size of fields that looks good. I chose 20s and 15s) print("%.15s%15s%15s%20s%15s"%("Nam e","Hours","Total Pay","Employee Number","Address")) for line in inputFile: dataList = line. split() name = dataList[0] hours = int(dataList[1]) payRate = float(dataList[2]) totalPay = hours*payRate print("%.15s%10d%15.2f%15s%20s"%(na me, hours, totalPay, dataList[3],dataList[4]))

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:10, kendall984
Which is a benefit of peer-to-peer networking? easy to add or remove devices main server has a fast processor more reliable than a client/server network same software versions on all computers
Answers: 3
image
Computers and Technology, 22.06.2019 17:50, ImBADatmath8743
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
image
Computers and Technology, 23.06.2019 02:30, bre563
Research data that is presented using descriptive language is said to be
Answers: 2
image
Computers and Technology, 23.06.2019 11:00, jaygamer37
What is the name of the sound effect that danny hears
Answers: 1
You know the right answer?
fileName = input("Enter the input file name: ") inputFile = open(fileName,'r') #add two new fields f...

Questions in other subjects:

Konu
Mathematics, 13.11.2020 14:00
Konu
Mathematics, 13.11.2020 14:00
Konu
Mathematics, 13.11.2020 14:00
Konu
Mathematics, 13.11.2020 14:00
Konu
Mathematics, 13.11.2020 14:00