The scoring notes for the TicketTracker FRQ part B, calculate the average price, explicitly state the response will not earn a point if the students:

• calculate the sum of all elements in the array

However, the sum would not be affected by tickets costing 0.00; assuming they calculate the average correctly (e.g. removing the free tickets from the denominator), would they truly not earn a point if they traversed the array, incrementing sum without an if statement checking for 0.00 tickets? See screenshot below. I’ve also included the scoring guidelines for reference.

@codydiliberto - Hi Cody - thanks for posting your question. The rubric is specifically stating that the sum in the loop must contain only elements with a value. Yes, it’s true that the elements without values do not affect the sum, but the number of elements without value also needs to be considered. In essence, this is assessing whether or not a student knows how to traverse the array and filter it.

I see from your example that the attempt is to reduce the number of elements traversed by deducting the “free” tickets from the length of the array. Even though in theory this is filtering the array, it is not selecting the correct elements.

For example: {3.50, 0.0, 5:00, 0.0}

Running the given code on this set would result in a value of 1.75 because the length would be reduced by 2, so only elements 0 and 1 would be added to the sum.

Please let me know if this is helpful, or if I completely misunderstood your inquiry.

Have a great Thanksgiving!

Hi Cody,

Thank you for reaching out about this question’s scoring rubric. We shared your solution with the curriculum development team, and they agree that your solution is valid. That line you circled on the rubric is being taken off.

Best,

Lindsay