[SOLVED] CS 3424 Quiz 5

35.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

(1)
– each line in the input file contains the following fields in this order: lastname, firstname, section, assignment, grade.
– given a list of grades in the input file grades.txt, create an awk script which prints only the student’s name (first then last), grade, and assignment number for the section number specified on the cmd-line.
– lastly, print the average grade and the number of failing grades (<= 60) for the section number specified on the cmd-line. assume names do not have spaces.
grades.txt:
Adams, John, 2, 1, 30 Addams, Gomez, 3, 3, 80 Allen, Tim, 2, 1, 90 Ball, Lucille, 3, 2, 76 Buscemi, Steve, 3, 1, 80 Busey, Gary, 1, 3, 43 Cage, Nicolas, 2, 5, 110
output for section 1:
Gary Busey – 43 – 3
Fails = 1
Average Grade = 43
Script.awk
Outputs

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.