| You must solve these exercises by using arrays |
|---|
Notes:
brain: 65, 69, 70, 63, 70, 68.
heart: 102, 95, 98, 110.
lung: 112, 115, 113, 109, 95, 98, 100.
Write a program that calculates and prints the following information for each
of the tissues:
-number of measurments
-average enzyme activity
-variance
-standard deviation
Use the following formulas (n is the number of measurments):
| Average: | ![]() |
| Variance: | ![]() |
| Standard deviation: | ![]() |
For example, values for enzyme activity in the brain are calculated as the following:
| Number of measurments: | ![]() |
| Average: | ![]() |
| Variance: | ![]() |
| Standard deviation: | ![]() |
Notes:
print "\n"; print "$tissue\n-----\n"; printf "n: %3u\n", $n; printf "average: %5.1f\n", $average; printf "variance: %5.1f\n", $variance; printf "SD: %5.1f\n", $std;Find more about printf with perldoc -f printf and in the Functions section of the Programming Perl book.