subject

Write a function calcPastries which takes a parameter, a file name, as a string. Your function should read each line from the given filename, parse and process the data, and print the required information. Once the file has been read, your function should print the total pay from all lines. Your function should return the number of entries read from the file. Empty lines do not count as entries. If the input file cannot be opened, return -1 and do not print anything.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
What questions about an audience should be asked during presentation preparation? check all that apply. what does the audience already know about the topic? how will multimedia tools inspire the audience? is the information interesting and engaging? how will this information affect the presentation? will the audience change the message’s purpose? what is likely to interest the audience?
Answers: 3
question
Computers and Technology, 24.06.2019 17:00
Following are uses of spreadsheets. for each use, choose whether the use is a business use, consumer use, or student use. family budget: sales data: recording research data for science class:
Answers: 2
question
Computers and Technology, 24.06.2019 21:00
Which device has the most limited computing functionality?
Answers: 1
You know the right answer?
Write a function calcPastries which takes a parameter, a file name, as a string. Your function shoul...
Questions
question
Mathematics, 03.04.2021 21:20
question
Mathematics, 03.04.2021 21:20
question
Mathematics, 03.04.2021 21:20