11.Exercise Set 4

Exercise 4.1: Multidimensional Dot Products

Given: two two_dimensional arrays, x and y, of equal size and range;
Compose: a loop that returns an array of dot (or inner) product of each pair of corresponding rows.
Click here for a sample answer.

Exercise 4.2: Multidimensional Max

Given: two two_dimensional arrays, x and y, of equal size and range;
Compose: a loop that returns the value of the largest dot (or inner) product of each pair of corresponding rows.
Click here for a sample answer.

Exercise 4.3: Character Exclusion

Given: an array of characters, chr_array;
Compose: a loop that returns an array of the characters from chr_array that are either alphabetic characters or the space character.
Click here for a sample answer.

Exercise 4.4: General Character Exclusion

Given: an array of characters, chr_array and an array of forbidden characters, forbidden_chr_array;
Compose: a loop that returns an array of the characters from chr_array that are not elements of the array forbidden_chr_array.
Click here for a sample answer.




Previous Section



Next Section



Table of Contents