0% found this document useful (0 votes)
402 views1 page

Array 1D Practice Pseudocdes

The document provides directions for practicing arrays by initializing and traversing arrays storing various data like test marks, numbers, and animal names. It includes pseudocode examples to display array elements above a threshold, calculate the average of an array, print specific elements, update elements, and use loops to process array contents like reversing the order of values. The extensions ask to create additional arrays to calculate averages, determine how many scores are above/below average, and reverse the order of numbers in an array.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
402 views1 page

Array 1D Practice Pseudocdes

The document provides directions for practicing arrays by initializing and traversing arrays storing various data like test marks, numbers, and animal names. It includes pseudocode examples to display array elements above a threshold, calculate the average of an array, print specific elements, update elements, and use loops to process array contents like reversing the order of values. The extensions ask to create additional arrays to calculate averages, determine how many scores are above/below average, and reverse the order of numbers in an array.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Array Practice

Success Criteria: Initialize, and traverse arrays

Directions:

Do the following steps in order (and ask questions!):

1. An array MARKS stores the following data in this order: 81.2, 92.5, 48.9, 78.8, and 45.5.
Write pseudocode to display all marks that are above 70.

2. An array NUMBERS contains the following numbers in this order: 12, 42, 33, 67, 92, 58,
and 33. Write pseudocode to display the average of the array.

3. An array ANIMALS contains names of 10 animals.

4. Write the code to print the first element of MARKS.

5. Write the code to print the third element of NUMBERS.

6. Write the code to print the last element of ARGUMENTS.

7. Write code to set the second to last element of MARKS to 90.5.

8. Write code to set the third element of NUMBERS to be 99.

9. Write code to set the first six elements of ANIMALS to be "Java", and the rest to be
"Python". (HINT: use a loop or two)

Extensions

 Create an array that stores 15 test scores and use loops to compute the average. Then
determine how many scores are above and below the average. Print all results.

 Create an array of numbers and reverse the order of the values. If the actual array is:
1, 2, 3, 4, 5 the new array should be 5, 4, 3, 2, 1

You might also like