Write a program named printrecordpy that reads in a single


Question: Your task is to create a program named logmerge.py that takes, as input, two log file names on the command line. The program reads the individual logs, then writes out the merged records plus some information about the total costs incurred by the users found in merged log file.

a. Write a program named printRecord.py that reads in a single record from the first logfile, prints it, and exits.

b. Write a program named printRecords.py that loops over all records in the first log file, reading in a single record and printing it before reading in the next record.

c. Write a program named printAllRecords.py that does what printRecords.py does and then does the same for the second log file. You should not write any new functions to do this.

d. Write a program named printTable.py that loops over all records in the first log file, reading in a single record and storing it in a table. After all records have been stored in the table, loop through the table and print each record in turn.

e. Write a program named printBothTables.py that does what printTable.py does and then does the same for the second log file. You should not write any new functions to do this.

f. Write a program named merger.py that reads both log files into a table and then merges the two tables into a third table. It should then print all the records in the third table.

g. Write the final version of your program; it does what merger.py does and then loops through the records accumulating the op costs. It then prints the total.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Write a program named printrecordpy that reads in a single
Reference No:- TGS0991635

Expected delivery within 24 Hours