Write a program that reads in a single record

Assignment Help Programming Languages
Reference no: EM13738427

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.

Reference no: EM13738427

Questions Cloud

Describe kind of society that at least one of founding : Describe the kind of society that at least one of the founding fathers envisioned for America.
Compare and contrast path-goal and normative decision theory : Compare and contrast Path-Goal Theory and Normative Decision Theory with a focus on which you believe leads to the most effective organizational leadership. Provide specific examples to support your response
Analyze culture of the company for which you work : Analyze the organizational structure and culture of the company for which you work (or would like to work) to determine its approach to team development, and whether that approach helped to enhance your relationship skills in the workplace
Compute the quantity of ice : How much ice at a temperature of -17.7 C must be dropped into the water so that the final temperature of the system will be 220 C ?
Write a program that reads in a single record : Write a program named printRecord.py that reads in a single record from the first logfile, prints it, and exits - Write the final version of your program; it does what merger.py does and then loops through the records accumulating the op costs. It t..
What products are being offered by a shop : Using the broad definition of a product, identify and explain what products are being offered by a shop that specializes in bicycles; by a travel agent; by a supermarket; and, by a new car dealer
Find the percent uncertainty in answer : What is the percent uncertainty in your answer? The uncertainty of the force is 10 N and the uncertainty of the acceleration is 0.01 m/s2.
Determine the estimated time needed : You have just started your new job as a junior programmer at Wrigh's Design House. The Project Manager has asked you to develop a program to determine the estimated time needed to complete a design project.
Determine the distance of the second post from you : A fence post is 56.0m from where you are standing, in a direction 39.0? north of east. What is the distance of the second post from you, if the distance between the two posts is 90.0m ?

Reviews

Write a Review

Programming Languages Questions & Answers

  Build your own maze

Build your own maze and make it so easy so i can understand it. try to use for while statement. it is an easy task so please do not make it complicated and follow the instructions that im going to post. another thing do not use the maze that in th..

  Implement comparators to support sorting

Extend Project 1 to use advanced data structures and support sorting on various keys.

  Explain how is recursion and iteration used in programming

question 1 how is recursion and iteration used in programming? provide examples of the various types of recursion and

  Develop unix shell script to input number of hours

Develop a Unix shell script to input number of hours worked and pay rate and calculate the total pay, then the social security amount (assume 5%), then the net pay.

  Write a program that bounces blue ball inside jpanel

Write a program that bounces a blue ball inside JPanel. The ball should begin moving with a mousePressed event. When the ball hits the edge of the JPanel.

  Explain is there a downside to using prototypes

Is there a downside to utilizing prototypes? Prototypes can show to user the look and feel of application but frquently the more sophisticated tools (like data entry verification) have not been implemented.

  Write program that prompts user to specify people and car

Write a C++ program that prompts the user to specify people and cars. Store them in a vector and a vector .

  Write program to establish two savings accounts

Write program which establishes two savings accounts with saver1 having account number 10002 with initial balance of $2,000, and saver2 having account 10003 with initial balance of $3,000.

  Create a program that uses the same formula

Create a program that uses the same formula above to output the result; this time, however, prompt the user for the values a, b, x, and y.

  Test a program for summing

You are to implement and test a program for summing 1/x as x runs over all approximately eight million (23 fraction bits) single precision floating point numbers in the interval [1, 2). You are to do this on a server, PC (or Mac) of your choice..

  Brief explanations for the solutions in the ms word file

You have a server-side script that cannot handle any ampersands (&) in the form data. Write a function that converts all ampersands in a form field to " and " when the field loses focus (onblur).

  Assembly language instructions into machine code

The assembly instructions are stored in a file. Each line of the file stores exactly oneinstruction. The name of the file should be provided to the program as a command line argument.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd