Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In AWK programming language, please help me do it correctly as I am trying to understand this. Correct answers only. Code and screenshot will be

In AWK programming language, please help me do it correctly as I am trying to understand this. Correct answers only. Code and screenshot will be extremely helpful!!

image text in transcribed

AWK Programming Save the following data in a file named teamlist.txt: Name,Team,First Test, Second Test, Third Test Tom.Red,5,17,22 Joe,Green,3,14,22 Maria,Blue,6,18,21 Fred,Blue,2,15,23 Carlos,Red,-1,15,24 Phuong,Green,7,19,21 Enrique,Green,3,16,20 Nancy,Red,9,12,24 Write an AWK script that will compute the average score for every person in the list, the average score for each test, and the average score for each team. If a score is negative, that means the person missed the test, and the score must not become part of the average Print the output to look like the following. In the list by name, the names must be left justified in a field of size 10 (hint: %-10s in print), and the averages must be seven characters wide with two digits to the right of the decimal point (%7.21) Name Average 14.67 13.00 Tom Joe Maria 15.00 Fred Carlos 19.50 Phuong 15.67 Enrique 13.00 Nancy 15.00 13.33 Average for Test 1: 5 Average for Test 2: 15.75 Average for Test 3: 22.125 Average for Red Team: 16 Average for Green Team: 13.8889 Average for Blue Team: 14.1667

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions