Reference no: EM132354737
Question
A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: The name of the client, the service sold (such as Dinner, Conference, Lodging, and so on), the amount of the sale, and the date of that event.
Write a program that reads such a file and displays the total amount for each service category. Use the following data for your text file:
Bob;Dinner;10.00;January 1, 2013
Tom;Dinner;14.00;January 2, 2013
Anne;Lodging;125.00;January 3, 2013
Jerry;Lodging;125.00;January 4, 2013
The output should be:
Dinner: 24.00
Lodging: 250.00
a) Your code with comments
A screenshot of the execution
Construct a function named intersperse that will prompt user
: Construct a function named intersperse that will prompt the user to enter two sentences. Then it will print a combined sentence, consisting of alternating words
|
Calculate the sum of all digits of the given integer n
: Calculate the sum of all digits of the given integer n. Then, implement a recursive python function to compute the digital root digital_root.
|
Research fraud cases that involved agency conflicts
: What recommendations do you have to stop such a fraud relating to this conflict of interest? Research fraud cases that involved agency conflicts.
|
Write a function called overlap that takes a set of integers
: Write a function called overlap that takes a set of integers and a list of integers as parameters and that returns a new set containing values that appear.
|
Display the total amount for each service category
: The name of the client, the service sold (such as Dinner, Conference, Lodging, and so on), the amount of the sale, and the date of that event.
|
Write program that asks the user to input a set of floating
: Write program that asks the user to input a set of floating-point values. When the user enters a value that is not a number, give the user a second chance.
|
Critical issues of this strategic management business case
: What's this Strategic Management Business Case about? Which are the three most Critical Issues of this Strategic Management Business Case?
|
Allow the user to specify the file name on the command-line
: Allow the user to specify the file name on the command-line. If the user doesn't specify any file name, then prompt the user for the name.
|
Write the program that reads from a text file
: Write the program that reads from a text file. Read each line and send it to the output file, preceded by line numbers. Whose fleece was white as snow.
|