Skip to content

Commit 300d20f

Browse files
committed
Corrected misspelled indicies in multiple pages
1 parent e61349f commit 300d20f

10 files changed

Lines changed: 16 additions & 16 deletions

File tree

_sources/TimedTests/Exercises.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Click the |start| button when you are ready to begin the exam, but only then as
275275
:correct: d
276276
:feedback_a: This would be true if it was return(a[1]*= 2);.
277277
:feedback_b: This would be true if the return statement was return (a[0]*=2);.
278-
:feedback_c: This would be true if it was a[0]--; Or it would be true if array indicies started at 1, but they start with 0.
278+
:feedback_c: This would be true if it was a[0]--; Or it would be true if array indices started at 1, but they start with 0.
279279
:feedback_d: The statement a[1]--; is the same as a[1] = a[1] - 1; so this will change the 3 to a 2. The return (a[1] * 2) does not change the value at a[1].
280280
:feedback_e: This can't be true because a[1]--; means the same as a[1] = a[1] - 1; So the 3 will become a 2. Parameters are all pass by value in Java which means that a copy of the value is passed to a method. But, since an array is an object a copy of the value is a copy of the reference to the object. So changes to objects in methods are permanent.
281281

_sources/TimedTests/test1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ Click the |start| button when you are ready to begin the exam, but only then as
546546
:correct: d
547547
:feedback_a: This would be true if it was <code>return(a[1]*= 2);</code>.
548548
:feedback_b: This would be true if the return statement was <code>return (a[0]*=2);</code>.
549-
:feedback_c: This would be true if it was <code>a[0]--;</code> Or it would be true if array indicies started at 1, but they start with 0.
549+
:feedback_c: This would be true if it was <code>a[0]--;</code> Or it would be true if array indices started at 1, but they start with 0.
550550
:feedback_d: The statement <code>a[1]--;</code> is the same as <code>a[1] = a[1] - 1;</code> so this will change the 3 to a 2. The return <code>(a[1] * 2)</code> does not change the value at <code>a[1]</code>.
551551
:feedback_e: This can't be true because <code>a[1]--;</code> means the same as <code>a[1] = a[1] - 1;</code> So the 3 will become a 2. Parameters are all pass by value in Java which means that a copy of the value is passed to a method. But, since an array is an object a copy of the value is a copy of the reference to the object. So changes to objects in methods are permanent.
552552

_sources/TimedTests/test3.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Click the |start| button when you are ready to begin the exam, but only then as
4646
:correct: c
4747
:feedback_a: This would be true if it was adding up all the values in the third column, the one at index 2.
4848
:feedback_b: This would be true if it was adding up all the values in the first column, the one at index 0.
49-
:feedback_c: This code adds up all the values in the second column, the one at index 1 since column indicies start at 0.
49+
:feedback_c: This code adds up all the values in the second column, the one at index 1 since column indices start at 0.
5050
:feedback_d: This would be true if it was adding up all the values in the last column, the one at index 3.
5151
:feedback_e: This would be true if it was adding up all the values in the first row, but the row changes each time through the for loop.
5252

_sources/Unit6-Arrays/Exercises.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ You can step through the code above with the Java Visualizer by clicking the fol
356356
:correct: b
357357
:feedback_a: This would be true if it was <code>return (a[1] *= 2);</code>, which would change the value at <code>a[1]</code>.
358358
:feedback_b: The statement <code>a[1]--;</code> is the same as <code>a[1] = a[1] - 1;</code> so this will change the 3 to 2. The <code>return (a[1] * 2)</code> does not change the value at <code>a[1]</code>.
359-
:feedback_c: This would be true if array indicies started at 1 instead of 0 and if the code changed the value at index 1 to the current value times two.
359+
:feedback_c: This would be true if array indices started at 1 instead of 0 and if the code changed the value at index 1 to the current value times two.
360360
:feedback_d: This would be true if array indices started at 1 rather than 0.
361361
:feedback_e: This can't be true because <code>a[1]--;</code> means the same as <code>a[1] = a[1] - 1;</code> so the 3 changes to 2. Parameters are all pass by value in Java which means that a copy of the value is passed to a method. But, since an array is an object a copy of the value is a copy of the reference to the object. So changes to objects in methods are permanent.
362362

_sources/Unit6-Arrays/arrayExam.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Click the "Start" button when you are ready to begin the exam, but only then as
5151
:feedback_a: This would be true if the while loop continued as long as i1 and i2 where greater than or equal to 0.
5252
:feedback_b: This loops and only increments count when the same value is in x1 and x2, but it doesn't compare the values at index 0 since it stops when either index is 0.
5353
:feedback_c: It may appear that the indices get out of synchronization, but check out the else if and else code.
54-
:feedback_d: The very first time through the loop the values at the two indicies are equal and count is incremented.
54+
:feedback_d: The very first time through the loop the values at the two indices are equal and count is incremented.
5555

5656
What is the value of ``count`` after the following code has executed?
5757

@@ -124,7 +124,7 @@ Click the "Start" button when you are ready to begin the exam, but only then as
124124
:correct: e
125125
:feedback_a: While count starts at 0 it is incremented when a match is found, which will happen when i1 is 1 and i2 is 0.
126126
:feedback_b: This would be true if the loop stopped after the first match was found, but it does not.
127-
:feedback_c: This would be true if the code only looked for a match at the same indicies.
127+
:feedback_c: This would be true if the code only looked for a match at the same indices.
128128
:feedback_d: This would be true if both i2 and i1 were incremented when a match was found.
129129
:feedback_e: This code only increments i2 when a match is found, which means that the 2 at position 2 in x1 matches both 2's in x2.
130130

_sources/Unit6-Arrays/numberCubeB.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The following is a free response question from 2009. It was question 1 on the e
3737
series of number cube tosses. The method returns the starting index in the array of a run of maximum size. A
3838
run is defined as the repeated occurrence of the same value in two or more consecutive positions in the
3939
array. In the example array shown above there are two runs of length 4. One starts at index 6 and one at index 14. The method
40-
may return either of those indicies.
40+
may return either of those indices.
4141

4242
If there are no runs of any value, the method returns -1.
4343

_sources/Unit8-2DArray/a2dEasyMC.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ You can see how the array looks by clicking on the following `Ex-9-7-1 <http://c
3131
:answer_e: <code>strGrid[0][0] = "S";</code>
3232
:correct: d
3333
:feedback_a: The code <code>letterGrid[0][2] = "S";</code> actually sets the 1st row and 3rd column to hold a reference to the <code>String</code> object "S".
34-
:feedback_b: This would be true if row and column indicies started at 1 instead of 0 and if this was in column major order.
35-
:feedback_c: This would be true if row and column indicies started at 1 instead of 0.
36-
:feedback_d: In row-major order the row is specified first followed by the column. Row and column indicies start with 0. So <code>letterGrid[2][0]</code> is the 3rd row and 1st column.
34+
:feedback_b: This would be true if row and column indices started at 1 instead of 0 and if this was in column major order.
35+
:feedback_c: This would be true if row and column indices started at 1 instead of 0.
36+
:feedback_d: In row-major order the row is specified first followed by the column. Row and column indices start with 0. So <code>letterGrid[2][0]</code> is the 3rd row and 1st column.
3737
:feedback_e: This would set the element at the first row and column.
3838

3939
Which of the following statements assigns the letter S to the third row and first column of a two-dimensional array named ``strGrid`` (assuming row-major order).
@@ -47,10 +47,10 @@ You can see how the array looks by clicking on the following `Ex-9-7-1 <http://c
4747
:answer_e: a[3][1]
4848
:correct: c
4949
:feedback_a: This would be true if the row index started at 0, but the column index started at 1.
50-
:feedback_b: Both the row and column indicies start with 0.
50+
:feedback_b: Both the row and column indices start with 0.
5151
:feedback_c: The value 6 is at row 0 and column 2.
5252
:feedback_d: The row index is specified first, then the column index.
53-
:feedback_e: The row index is specified first and the indicies start at 0.
53+
:feedback_e: The row index is specified first and the indices start at 0.
5454

5555
How would you get the value 6 out of the following array ``int[][] a = { {2, 4, 6, 8}, {1, 2, 3, 4}};``?
5656

_sources/Unit8-2DArray/a2dSummary.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ Common Mistakes
7474
- using ``array.length()`` instead of ``array.length`` (not penalized on the free response)
7575
- going out of bounds when looping through an array (using ``index <= array.length``). You will get an ``ArrayIndexOutOfBoundsException``.
7676
- jumping out an loop by using one or more return statements before every value has been processed.
77-
- using the wrong starting and ending indicies on loops.
77+
- using the wrong starting and ending indices on loops.
7878
- using ``array.length`` for both the number of rows and columns. Use ``array[0].length`` for the number of columns.

_sources/Unit8-2DArray/topic-8-1-2D-arrays-Day2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Try the code below. Did it print what you expected? When you print a two dimens
131131
:feedback_a: Remember that the indices start at 0.
132132
:feedback_b: Remember that the row is first then the column.
133133
:feedback_c: This will set the value of the 3rd row and 2nd column.
134-
:feedback_d: Remember that the row is first and then the column and that the indicies start at 0.
134+
:feedback_d: Remember that the row is first and then the column and that the indices start at 0.
135135

136136
Which of the following sets the value for the 3rd row and 2nd column of a 2D array called ``nums``?
137137

@@ -162,7 +162,7 @@ Get a Value from a 2D Array
162162
.. index::
163163
pair: 2D Array; access value
164164

165-
To get the value in a 2D array give the name of the array followed by the row and column indicies in square brackets. The code below will get the value at row index 1 and column index 0 from ``ticketInfo``. It will also get the value at row index 0 and column index 1 from ``seatingChart``.
165+
To get the value in a 2D array give the name of the array followed by the row and column indices in square brackets. The code below will get the value at row index 1 and column index 0 from ``ticketInfo``. It will also get the value at row index 0 and column index 1 from ``seatingChart``.
166166

167167
.. code-block:: java
168168

_sources/Unit8-2DArray/topic-8-2-2D-array-loops-Day1.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Arrays know their length (how many elements they can store). The length is a pu
5252
:answer_d: nums[1][2]
5353
:correct: c
5454
:feedback_a: This would be true if array indices started with 1 but they start with 0.
55-
:feedback_b: This would be true if array indicies started with 1 and the column was specified first. However, array indices start at 0 and the row is given first in row-major order.
55+
:feedback_b: This would be true if array indices started with 1 and the column was specified first. However, array indices start at 0 and the row is given first in row-major order.
5656
:feedback_c: Array indices start with 0 so the third row has an index of 2 and the second column has an index of 1.
5757
:feedback_d: This would be true if the column index was first, but in row-major order the row index is first.
5858

0 commit comments

Comments
 (0)