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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
What role do chromosomes play in inheritance?
Answers: 1
question
Computers and Technology, 23.06.2019 00:50
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
question
Computers and Technology, 23.06.2019 17:30
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
Answers: 1
question
Computers and Technology, 24.06.2019 04:30
How do you share someone else’s tweet with your own twitter followers?
Answers: 1
You know the right answer?
fileName = input("Enter the input file name: ") inputFile = open(fileName,'r') #add two new fields f...
Questions
question
Mathematics, 25.07.2020 22:01