Logic array: Identifying qualifying times
Create a logic array qualifyingIndex with true for any location where the runner is male with a running time less than 8.2. Row ...
Relational operators: Guessing game
Row array userGuess contains a sequence of user guesses. Create a logical indexing array correctGuess with true in each location...
Logical indexing: High scores
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than 5...
11 years ago
Solved
Logical indexing: Player scores
Player 1 and player 2 take turns playing a game. Row array gameScores contains the scores of player 1, then player 2, then playe...
11 years ago
Solved
Integer indexing array: Shift left
Write a *single* statement that shifts row array attendanceValues one position to the left. The rightmost element in attendanceV...
11 years ago
Solved
Integer indexing array: Weekend box office
The row array movieBoxOffice stores the amount of money a movie makes (in millions of $) for the 7 days of a week, starting with...
Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...