Using the chores.csv file fat the very bottom; write an awk script to return the average number of minutes required to complete a chore. Your solution must handle an undefined number of chores. zero points will be given to solutions that use a static number in their calculation.
Format floating point numbers to 2 decimal places.
Example output;
Average: 28.12
chores.csv
Chore Name,Assigned to,estimate,done?
Laundry,Chelsey,45,N
Wash Windows,Sam,60,Y
Mop kitchen,Sam,20,N
Clean cookware,Chelsey,30,N
Unload dishwasher,Chelsey,10,N
Dust living room,Chelsey,20,N
Wash the dog,Sam,40,N

Answers

Answer 1

Answer: Provided in the explanation section

Explanation:

According to the question:

Using the chores.csv file fat the very bottom; write an awk script to return the average number of minutes required to complete a chore. Your solution must handle an undefined number of chores. zero points will be given to solutions that use a static number in their calculation.

Format floating point numbers to 2 decimal places.

Example output;

Average: 28.12

chores.csv

Chore Name,Assigned to,estimate,done?

Laundry,Chelsey,45,N

Wash Windows,Sam,60,Y

Mop kitchen,Sam,20,N

Clean cookware,Chelsey,30,N

Unload dishwasher,Chelsey,10,N

Dust living room,Chelsey,20,N

Wash the dog,Sam,40,N

ANSWER:

BEGIN{

FS=","

}

{

if(NR!=1)

sum += $3

}

END{

avg=sum/NR

printf("Average: %.2f ", avg)

}' ./chores.csv

cheers i hope this helped !!

Using The Chores.csv File Fat The Very Bottom; Write An Awk Script To Return The Average Number Of Minutes

Related Questions

Write a program that prompts the user to input five decimal numbers. The program should then add the five decimal numbers, convert the sum to the nearest integer, and print the result.Use the static_caststatement with an appropriate equation to convert the sum to an integer. Compile and run your program with the following test data:Case 1: Input: 5.1, 5.1, 5.1, 5.1, 5.1. Expected Output: 26.Case 2: Input: 5.0, 5.0, 5.0, 5.0, 5.0. Expected Output: 25

Answers

Answer:

#include <iostream>

#include <cmath>

using namespace std;

int main()

{

   double num1, num2, num3, num4, num5, sum = 0;

   cout << "Input: ";

   cin >> num1 >> num2 >> num3 >> num4 >> num5;

   

   sum = num1 + num2 + num3 + num4 + num5;

   cout << "Output: " << static_cast<int>(round(sum)) << endl;

   return 0;

}

Explanation:

Include cmath to use the round function

Declare the variables

Get the five numbers from the user

Sum them and assign the result to the sum

Round the sum using the round function, and convert the sum to an integer using static_cast statement

Print the sum

Write a script called checkLetter.sh Review Greeting.sh for an example. Use a read statement and ask user to "Enter A, B, or C: "

If user types A, echo "You entered A"
If user types B, echo " You entered B"
If user types C, echo " You entered C"
Use the case structure to test the user’s string.
If user types any letter from lower case ‘a through z’ or upper case ‘D through Z’, echo "You did not enter A, B, or C".

Answers

Answer:

The code is given as below: The input and output is as given for one case.

Explanation:

echo -e "Enter A, B or C : \c" #Printing the line on the screen

read -rN 1 test #read the character in the variable test

echo

case $test in #Setting up the case structure for variable test

[[:lower:]] ) #checking all lower case letters

echo You did not enter A, B or C;;

[D-Z] ) #checking upper case letters from D to Z

echo You did not enter A, B or C;;

A ) #Condition to check A

echo You entered A;;

B ) #Condition to check B

echo You entered B;;

C ) #Condition to check C

echo You entered C;;

esac #Exiting the case structure

Other Questions
Kelly bought a computer that was 20% off the regular price of $1,060. If a 7% sales tax was added to the cost of the computer, what was the total price Kelly paid for it? Robin read somewhere that adding salt to water while heating it will raise the temperature ofthe water causing it to boil faster. To test this claim, she filled 30 identical pots with one quartof water. She randomly selected 15 of the pots and added 1 teaspoon of salt. She then placedeach pot on identical burners set to the highest setting. She measured the water temperatureIn each pot after 5 minutes.Is Robin's research method an example of an observational study experiment, orsimulation?bIf Robin does find that there is a difference between the water temperatures in the potswith salt compared to those without can she conclude that the salt caused thedifference in temperature? Which rule represents the translation from the pre image, rhombus ABCD, to the image rhombus A'B'C'D' ? Motion maps for two objects, Y and Z, are shown.A motion map. The position line is a long black arrow pointing right with x as the reference point at left. Above the line are three dots, each with a vector pointed away from x back to back in a line labeled B. Above B, there are four dots, each with a shorter vector pointing away from x in a line labeled A starting closer to x .Object Z passes object Y after how many seconds?2345 How were the Neolithic Revolution and Industrial Revolution alike and different? Christianity arose from the teachings ofJesusMosesthe apostlesthe disciples Identifying a proportion Which proportion resulted in the equation 3a = 7b A game is played using one die. If the die is rolled and shows 1, the player wins $5. If the die shows any number other than 1, the player wins nothing. If there is a $1 charge to play the game, what is the games expected value? Based on this passage. what can you conclude aboutthe relationship between risk factors and gangmembership?An increase in youth risk factors and the desire tojoin a gang are directly related to each other.Low self-esteem is all that is needed for a youngperson to be more likely to join a gangRisk factors have little effect on a person s finaldecision to join a gang,Prevention programs should target one specifictype of risk factor to reduce gang membership Answer the question based on the following supply and demand schedules in units per week for a product. Price Quantity Demanded Quantity Supplied $60 100 400 50 140 340 40 180 280 30 220 220 20 260 160 10 300 100 If the government introduced a guaranteed price floor of $40 and agreed to purchase surplus output, then the government's total support payments to producers would be Consider the previous situation. Under what condition would the acceleration of the center of mass be zero? Keep in mind that F1x and F2x represent the components, of the corresponding forces. Consider the previous situation. Under what condition would the acceleration of the center of mass be zero? Keep in mind that and represent the components, of the corresponding forces. F1x=F2x F1x=F2x m1=m2 m1m2 How do you solve this problem? population proportion is to be estimated from a sample of 400 with a sample proportion of 0.1. Approximate the 95% confidence interval of the population proportion QUESTION 4(01.01 LC)A parent wants to take his son to a location in the neighborhood where he can engage in balance and stretching activities. Which location would be most appropriate? Fitness trailCommunity swimming poolDance studioLocal playground Language is a complex system that includes the ways we express ourselves, such as speaking or writing, and ways we receive information, such as listening and reading. a. true b. false Why are plant leaves green? Select one: a. They absorb only green wavelengths of light. b. They absorb only yellow and blue wavelengths of light. c. They reflect nearly all wavelengths of light. d. They reflect green wavelengths of light. e. They reflect yellow and blue wavelengths of light. All else being equal, a study with which of the following error ranges would bethe most reliable?A. +-6 percentage pointsB. +-15 percentage pointsC. +-9 percentage pointsD.+- 112 percentage points What subjects were taught in the 1960s? Which is the graph of the linear equation 3x + 2y = 6? I WILL CHOOSE YOU AS BRAINLIEST , PLEASEE HELP ME IT URGENT!!!!!!!!!!!!Relate acceleration qualitatively to a change in speed and/or direction as a result of a net force Isabella changes 700 euros to pounds sterling for her trip to England. The exchange rate is 1 euro = 0.72 How many pounds will she get?