BONUS = 0.15 # Author: James Tam # Version: November 7, 2013 # On a line-by-line basis the program reads from a file called "employees.txt". # Each line is separated into the three fields: name, occupation, income. # Because it's a good year each employee gets a bonus of 15% to his/her income. BONUS = 0.15 inputFile = open("employees.txt", "r") print("Reading from file input.txt") for line in inputFile: name,job,income = line.split(",") #Fields divided by a comma last,first = name.split() income = int(income) income = income + (income * BONUS) print("Name: %s, %s\t\t\tJob: %s\t\tIncome $%.2f" %(first,last,job,income)) print("Completed reading of file input.txt") inputFile.close()