using matlab:
An instructor has promised a class a pizza party if the majority of the class scores well on the final exam.
Complete the function PizzaParty(), which takes a 1x40 array of scores as input. The function should return the following for the instructor's report:
averageScores - the arithmetic mean of the class scores
deviationScores - the standard deviation of the class scores
medianScores - the median of the class scores
modeScores - the mode, or score that appears the most often
partyDecision - a logical variable that is set to 1 if averageScores >=65 and modeScores >=75
Ex: Given
scores = [82 89 95 92 84 74 83 78 66 87 98 87 68 80 74 99 60 93 98 60 92 76 63 91 69 89]
then
averageScores = 81.8077
deviationScores = 12.0963
medianScores = 83.5000
modeScores = 60
partyDecision = logical 0

Respuesta :

The Function:

function [averageScores, deviationScores, medianScores, modeScores, partyDecision] = PizzaParty(scores)

   averageScores = mean(scores);

   deviationScores = std(scores);

   medianScores = median(scores);

   modeScores = mode(scores);

   if averageScores >= 65 && modeScores >= 75

       partyDecision = 1;

   else

       partyDecision = 0;

   end

end

What is Function?
A function is a reusable block of code that performs a specific task. It is used to avoid writing the same code multiple times and can be used to easily modify code when needed. Functions are defined by their parameters, which are the variables that are used to pass information to the function. Functions are also known as subroutines, methods, or procedures. They can be used to store data, calculate values, and perform a variety of other tasks. Functions can help make code more readable and organized, as well as make it easier to debug and maintain.

To learn more about Function
https://brainly.com/question/27020671
#SPJ4