Download results
Showing 0-0 of 0 results
Items per page:
10
25
50
100
#
Exercise Title
Features
Description
Platform
Keywords
1
Given a two-dimensional array of integers, return the average of the four corner elements.
Code Completion
Given a two-dimensional array of integers, return the average of the four corner elements.
CodeCheck
Two-Dimensional Arrays
,
No Loops
2
Given a two-dimensional array of integers, return the middle element if both the row and column lenghts are odd, or the average of the two or four middle elements of one or both is even.
Code Completion
Given a two-dimensional array of integers, return the middle element if both the row and column lenghts are odd, or...
CodeCheck
Two-Dimensional Arrays
,
No Loops
3
Given a two-dimensional array of integers and a string N, E, S, W, give the middle element along the border in the given compass direction, or the average of the two middle ones if the border length is even.
Code Completion
Given a two-dimensional array of integers and a string N, E, S, W, give the middle element along the border...
CodeCheck
Two-Dimensional Arrays
,
No Loops
4
Given a two-dimensional array of integers and a string NW, NW, SW, SE, return the sum of the four elements in the given compass direction.
Code Completion
Given a two-dimensional array of integers and a string NW, NW, SW, SE, return the sum of the four elements...
CodeCheck
Two-Dimensional Arrays
,
No Loops
5
Given a two-dimensional array of integers, row/column indexes r, c, and a string N E S W, return the neighbor in that direction, or 0 if it doesn't exist.
Code Completion
Given a two-dimensional array of integers, row/column indexes r, c, and a string N E S W, return the neighbor...
CodeCheck
Two-Dimensional Arrays
,
No Loops
6
Repeat with NW NE SW SE.
Code Completion
Repeat with NW NE SW SE.
CodeCheck
Two-Dimensional Arrays
,
No Loops
7
Given a two-dimensional array of integers and row/column indexes r, c, return the number of neighbors (not counting the element itself).
Code Completion
Given a two-dimensional array of integers and row/column indexes r, c, return the number of neighbors (not counting the element...
CodeCheck
Two-Dimensional Arrays
,
No Loops
8
On a chessboard, positions are marked with a letter between a and h for the column and a number between 1 and 8 for the row.
Code Completion
On a chessboard, positions are marked with a letter between a and h for the column and a number between...
CodeCheck
Two-Dimensional Arrays
,
No Loops
9
Given a two-dimensional array of integers, return the number of distinct elements.
Code Completion
Given a two-dimensional array of integers, return the number of distinct elements.
CodeCheck
Two-Dimensional Arrays
,
Complex Loops
10
Given a two-dimensional array of integers, remove any adjacent duplicate rows by filling the duplicates with zeroes.
Code Completion
Given a two-dimensional array of integers, remove any adjacent duplicate rows by filling the duplicates with zeroes.
CodeCheck
Two-Dimensional Arrays
,
Complex Loops
11
Given a two-dimensional array of integers, return the index of the first row that is entirely filled with zeroes.
Code Completion
Given a two-dimensional array of integers, return the index of the first row that is entirely filled with zeroes.
CodeCheck
Two-Dimensional Arrays
,
Complex Loops
12
Given a two-dimensional array of integers, return the top left corner of the first subarray of the form <pre>0 0 0 0</pre>
Code Completion
Given a two-dimensional array of integers, return the top left corner of the first subarray of the form
0 0...
CodeCheck
Two-Dimensional Arrays
,
Complex Loops
13
Given a two-dimensional array of integers, return the position of the largest square subarray filled with zeroes, as a list of length 2.
Code Completion
Given a two-dimensional array of integers, return the position of the largest square subarray filled with zeroes, as a list...
CodeCheck
Two-Dimensional Arrays
,
Complex Loops
14
Repeat the previous exercise with subarrays that are not necessarily square.
Code Completion
Repeat the previous exercise with subarrays that are not necessarily square.
CodeCheck
Two-Dimensional Arrays
,
Complex Loops
15
Given a two-dimensional array of integers and row/column positions r, c, return the largest neighbor in the compass directions N E S W.
Code Completion
Given a two-dimensional array of integers and row/column positions r, c, return the largest neighbor in the compass directions N...
CodeCheck
Two-Dimensional Arrays
,
Looping over Neighbors
16
Given a two-dimensional array of integers and row/column positions r, c, return the largest neighbor in the compass directions N E S W NE NW SE SW.
Code Completion
Given a two-dimensional array of integers and row/column positions r, c, return the largest neighbor in the compass directions N...
CodeCheck
Two-Dimensional Arrays
,
Looping over Neighbors
17
Given a two-dimensional array of integers and row/column positions r, c, return the compass direction of the largest neighbor as a string N E S W NE NW SE SW.
Code Completion
Given a two-dimensional array of integers and row/column positions r, c, return the compass direction of the largest neighbor as...
CodeCheck
Two-Dimensional Arrays
,
Looping over Neighbors
18
Given a two-dimensional array of integers, row/column positions r, c, and a value x, fill the given element and its neighbors in the compass directions N E S W NE NW SE SW with x.
Code Completion
Given a two-dimensional array of integers, row/column positions r, c, and a value x, fill the given element and its...
CodeCheck
Two-Dimensional Arrays
,
Looping over Neighbors
19
Given a two-dimensional array a of integers and row/column positions r, c, return a 3x3 array whose middle element is a[r][c], and whose neighbors are copied from the original.
Code Completion
Given a two-dimensional array a of integers and row/column positions r, c, return a 3x3 array whose middle element is...
CodeCheck
Two-Dimensional Arrays
,
Looping over Neighbors
20
Given a two-dimensional array of integers, compute the sum of all positive elements.
Code Completion
Given a two-dimensional array of integers, compute the sum of all positive elements.
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
21
Given a two-dimensional array of integers, return the largest element in the array.
Code Completion
Given a two-dimensional array of integers, return the largest element in the array.
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
22
Given a two-dimensional array of integers, return the position of the smallest element in the array as a list of length 2.
Code Completion
Given a two-dimensional array of integers, return the position of the smallest element in the array as a list of...
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
23
Given a two-dimensional array of integers and a value x, return the position of the first match as a list of length 2.
Code Completion
Given a two-dimensional array of integers and a value x, return the position of the first match as a list...
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
24
Given a two-dimensional array of integers and a value x, return the positions of all matching elements, as a list of arrays of length 2.
Code Completion
Given a two-dimensional array of integers and a value x, return the positions of all matching elements, as a list...
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
25
Given a two-dimensional array of integers, compute the sum of all elements that are not one of the borders.
Code Completion
Given a two-dimensional array of integers, compute the sum of all elements that are not one of the borders.
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
26
Given a two-dimensional square array of integers, compute the sum of all elements that are not on one of the diagonals.
Code Completion
Given a two-dimensional square array of integers, compute the sum of all elements that are not on one of the...
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
27
Given a two-dimensional array of integers, replace all negative elements with zero.
Code Completion
Given a two-dimensional array of integers, replace all negative elements with zero.
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
28
Given a two-dimensional array of integers, reverse all rows.
Code Completion
Given a two-dimensional array of integers, reverse all rows.
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
29
Given a two-dimensional array of integers, shift each row by one to the right and put a 0 at the leftmost column.
Code Completion
Given a two-dimensional array of integers, shift each row by one to the right and put a 0 at the...
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
30
Given an r x c array of integers, return an (r + 2) x (c + 2) array whose borders are zero and whose interior is the original array.
Code Completion
Given an r x c array of integers, return an (r + 2) x (c + 2) array whose borders...
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
31
Given a two-dimensional array of integers, return a list of the largest element in each row.
Code Completion
Given a two-dimensional array of integers, return a list of the largest element in each row.
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
32
Given a two-dimensional array of integers, return a list of the number of negative elements in each row.
Code Completion
Given a two-dimensional array of integers, return a list of the number of negative elements in each row.
CodeCheck
Two-Dimensional Arrays
,
Looping Over the Entire Array
33
Given a two-dimensional array of integers and a row index, return the largest element in that row.
Code Completion
Given a two-dimensional array of integers and a row index, return the largest element in that row.
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
34
Given a two-dimensional array of integers and a row index r, reverse the given row.
Code Completion
Given a two-dimensional array of integers and a row index r, reverse the given row.
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
35
Given a two-dimensional square array of integers, reverse both diagonals.
Code Completion
Given a two-dimensional square array of integers, reverse both diagonals.
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
36
Given a two-dimensional array of integers and a column index, return the smallest element in that column.
Code Completion
Given a two-dimensional array of integers and a column index, return the smallest element in that column.
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
37
Given a two-dimensional array of integers, an index, and a string R or C, return the sum of the elements in that row or column.
Code Completion
Given a two-dimensional array of integers, an index, and a string R or C, return the sum of the elements...
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
38
Given a two-dimensional array of integers, a row index r, and a column index c, return the sum of all elements in the given row and column.
Code Completion
Given a two-dimensional array of integers, a row index r, and a column index c, return the sum of all...
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
39
Given a two-dimensional array of integers and a string N, E, S, W, return the sum of all elements of the border in the given compass direction.
Code Completion
Given a two-dimensional array of integers and a string N, E, S, W, return the sum of all elements of...
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
40
Given a two-dimensional array of integers, return the sum of all elements along the north and south border.
Code Completion
Given a two-dimensional array of integers, return the sum of all elements along the north and south border.
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
41
Given a two-dimensional array of integers, return the sum of all elements along all borders but not the corners.
Code Completion
Given a two-dimensional array of integers, return the sum of all elements along all borders but not the corners.
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
42
Given a two-dimensional array of integers, return the sum of all elements along all borders including the corners.
Code Completion
Given a two-dimensional array of integers, return the sum of all elements along all borders including the corners.
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
43
Given a two-dimensional square array of integers, return the sum of the elements along both diagonals.
Code Completion
Given a two-dimensional square array of integers, return the sum of the elements along both diagonals. Make sure not to...
CodeCheck
Two-Dimensional Arrays
,
Loops Along a Row or Column
44
Given an integer n, produce the array <pre>0 1 2 3 .
Code Completion
Given an integer n, produce the array
0 1 2 3 ... n 1 2 3 4 ... 0 ......
CodeCheck
Two-Dimensional Arrays
,
Producing 2D Arrays
45
Given two two-dimensional arrays a and b of integers with the same number of rows and columns, return a list of the same size where each element is the greater of the corresponding elements in the two arrays.
Code Completion
Given two two-dimensional arrays a and b of integers with the same number of rows and columns, return a list...
CodeCheck
Two-Dimensional Arrays
,
Producing 2D Arrays
46
Repeat the preceding exercise where the array dimensions need not match, filling positions that exist in neither array with 0.
Code Completion
Repeat the preceding exercise where the array dimensions need not match, filling positions that exist in neither array with 0.
CodeCheck
Two-Dimensional Arrays
,
Producing 2D Arrays
47
Given two two-dimensional arrays of integers with the same number of rows and columns, return the first position where they do not match, as a list of length 2.
Code Completion
Given two two-dimensional arrays of integers with the same number of rows and columns, return the first position where they...
CodeCheck
Two-Dimensional Arrays
,
Producing 2D Arrays
48
Given two two-dimensional arrays with the same number of rows, return a list that places them side by side.
Code Completion
Given two two-dimensional arrays with the same number of rows, return a list that places them side by side.
CodeCheck
Two-Dimensional Arrays
,
Producing 2D Arrays
49
Repeat where the row lengths don't have to match.
Code Completion
Repeat where the row lengths don't have to match. Fill the shorter array with zeroes.
CodeCheck
Two-Dimensional Arrays
,
Producing 2D Arrays
50
Given a two-dimensional array a, return a list whose [i][j] element is the average of the neighbors of a[i][j] in the N, E, S, W direction.
Code Completion
Given a two-dimensional array a, return a list whose [i][j] element is the average of the neighbors of a[i][j] in...
CodeCheck
Two-Dimensional Arrays
,
Producing 2D Arrays
51
(Two-dim arrays) Matrix multiply - CSEdPad
This program demonstrates the multiplication of two matrices using a two-dimensional array
AnnEx
2d arrays
52
Updating Two-Dimensional Array (Case 1)
Construct a program that initializes a 3x4 two-dimensional matrix that has the numbers 1 through 12 for entries, sets the...
PCEX
53
Updating Two-Dimensional Array (Case 2)
Construct a program that initializes a 3x3 two-dimensional matrix that has the numbers 1 through 9 for entries, sets the...
PCEX
54
Updating Two-Dimensional Array (Case 3)
Construct a program that initializes a 2x4 two-dimensional matrix that has multiples of 10 from 10 to 80 for entries,...
PCEX
55
Updating Two-Dimensional Array (Case 1)
Construct a program that initializes a 3x4 two-dimensional matrix that has the numbers 1 through 12 for entries, sets the...
PCEX
56
Updating Two-Dimensional Array (Case 2)
Construct a program that initializes a 3x3 two-dimensional matrix that has the numbers 1 through 9 for entries, sets the...
PCEX
57
Updating Two-Dimensional Array (Case 3)
Construct a program that initializes a 2x4 two-dimensional matrix that has multiples of 10 from 10 to 80 for entries,...
PCEX
58
csedpad.14.TwoDimensionalArrays.no_topic_1
This program generates a tictac toe board by using a two dimensional array.
PCEX
59
csedpad.14.TwoDimensionalArrays.no_topic
PCEX Set of activities for csedpad.14.TwoDimensionalArrays.no_topic
PCEX
60
csedpad.14.TwoDimensionalArrays.no_topic
This program calculates the average performance of 2 students by combining their performance in quiz, homework and discussion.
PCEX
61
csedpad.14.TwoDimensionalArrays.no_topic_1
PCEX Set of activities for csedpad.14.TwoDimensionalArrays.no_topic_1
PCEX
62
csedpad.14.TwoDimensionalArrays.no_topic_1
This program stores the ratings for 4 different movies and finds the average rating for the third movie.
PCEX
63
csedpad.14.TwoDimensionalArrays.no_topic_1
this program calculates the total cost of different items by multiplying unit cost of an item with count of items
PCEX
64
csedpad.14.TwoDimensionalArrays.twodimensionalarrays
PCEX Set of activities for csedpad.14.TwoDimensionalArrays.twodimensionalarrays
PCEX
65
csedpad.14.TwoDimensionalArrays.twodimensionalarrays
Generate a 5 x 5 Bingo board and initialize it with random numbers from 1 to 75. The board will...
PCEX
×
This is a detailed description.