You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _sources/practicequiz/sorting.rst
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,8 @@ Question 2
37
37
:answer_d: [1, 9, 19, 7, 3, 10, 13, 15, 8, 12]
38
38
:feedback_a: This answer represents three swaps. A pass means that you continue swapping all the way to the end of the list.
39
39
:feedback_b: Very Good
40
-
:feedback_c:A bubble sort contines to swap numbers up to index position passnum. But remember that passnum starts at the length of the list - 1.
41
-
:feedback_d:You have been doing an insertion sort, not a bubble sort.
40
+
:feedback_c:Try again.
41
+
:feedback_d:Try again.
42
42
43
43
Suppose you have the following list of numbers to sort:
44
44
[19, 1, 9, 7, 3, 10, 13, 15, 8, 12]
@@ -51,17 +51,17 @@ Question 3
51
51
52
52
.. mchoice:: sorting-practice-quiz-3
53
53
:correct: d
54
-
:answer_a: [7, 11, 12, 1, 6, 14, 8, 18, 19, 20]
55
-
:answer_b: [7, 11, 12, 14, 19, 1, 6, 18, 8, 20]
54
+
:answer_a: [7, 11, 1, 6, 12, 8, 14, 18, 19, 20]
55
+
:answer_b: [7, 11, 12, 14, 19, 1, 6, 20, 8, 18]
56
56
:answer_c: [11, 7, 12, 14, 1, 6, 8, 18, 19, 20]
57
57
:answer_d: [11, 7, 12, 14, 8, 1, 6, 18, 19, 20]
58
-
:feedback_a: Selection sort is similar to bubble sort (which you appear to have done) but uses fewer swaps
59
-
:feedback_b:This looks like an insertion sort.
58
+
:feedback_a: Selection sort is similar to bubble sort (which you appear to have done) but uses fewer swaps.
59
+
:feedback_b:Try again.
60
60
:feedback_c: This one looks similar to the correct answer but instead of swapping the numbers have been shifted to the left to make room for the correct numbers.
61
61
:feedback_d: Selection sort improves upon bubble sort by making fewer swaps.
62
62
63
63
Suppose you have the following list of numbers to sort:
64
-
[11, 7, 12, 14, 19, 1, 6, 18, 8, 20]
64
+
[11, 7, 12, 14, 19, 1, 6, 20, 8, 18]
65
65
Which list represents the partially sorted list after three complete **passes** of selection sort?
Copy file name to clipboardExpand all lines: docs/_sources/practicequiz/sorting.rst.txt
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,8 @@ Question 2
37
37
:answer_d: [1, 9, 19, 7, 3, 10, 13, 15, 8, 12]
38
38
:feedback_a: This answer represents three swaps. A pass means that you continue swapping all the way to the end of the list.
39
39
:feedback_b: Very Good
40
-
:feedback_c:A bubble sort contines to swap numbers up to index position passnum. But remember that passnum starts at the length of the list - 1.
41
-
:feedback_d:You have been doing an insertion sort, not a bubble sort.
40
+
:feedback_c:Try again.
41
+
:feedback_d:Try again.
42
42
43
43
Suppose you have the following list of numbers to sort:
44
44
[19, 1, 9, 7, 3, 10, 13, 15, 8, 12]
@@ -51,17 +51,17 @@ Question 3
51
51
52
52
.. mchoice:: sorting-practice-quiz-3
53
53
:correct: d
54
-
:answer_a: [7, 11, 12, 1, 6, 14, 8, 18, 19, 20]
55
-
:answer_b: [7, 11, 12, 14, 19, 1, 6, 18, 8, 20]
54
+
:answer_a: [7, 11, 1, 6, 12, 8, 14, 18, 19, 20]
55
+
:answer_b: [7, 11, 12, 14, 19, 1, 6, 20, 8, 18]
56
56
:answer_c: [11, 7, 12, 14, 1, 6, 8, 18, 19, 20]
57
57
:answer_d: [11, 7, 12, 14, 8, 1, 6, 18, 19, 20]
58
-
:feedback_a: Selection sort is similar to bubble sort (which you appear to have done) but uses fewer swaps
58
+
:feedback_a: Selection sort is similar to bubble sort (which you appear to have done) but uses fewer swaps.
59
59
:feedback_b: This looks like an insertion sort.
60
60
:feedback_c: This one looks similar to the correct answer but instead of swapping the numbers have been shifted to the left to make room for the correct numbers.
61
61
:feedback_d: Selection sort improves upon bubble sort by making fewer swaps.
62
62
63
63
Suppose you have the following list of numbers to sort:
64
-
[11, 7, 12, 14, 19, 1, 6, 18, 8, 20]
64
+
[11, 7, 12, 14, 19, 1, 6, 20, 8, 18]
65
65
Which list represents the partially sorted list after three complete **passes** of selection sort?
<lidata-component="answer" id="sorting-practice-quiz-2_opt_c">[1, 7, 3, 9, 10, 13, 8, 12, 15, 19]</li><lidata-component="feedback">A bubble sort contines to swap numbers up to index position passnum. But remember that passnum starts at the length of the list - 1.</li>
<lidata-component="answer" id="sorting-practice-quiz-2_opt_d">[1, 9, 19, 7, 3, 10, 13, 15, 8, 12]</li><lidata-component="feedback">You have been doing an insertion sort, not a bubble sort.</li>
<p>sorting-quiz3: Suppose you have the following list of numbers to sort:
271
-
[11, 7, 12, 14, 19, 1, 6, 18, 8, 20]
271
+
[11, 7, 12, 14, 19, 1, 6, 20, 8, 18]
272
272
Which list represents the partially sorted list after three complete <strong>passes</strong> of selection sort?</p>
273
273
274
-
<lidata-component="answer" id="sorting-practice-quiz-3_opt_a">[7, 11, 12, 1, 6, 14, 8, 18, 19, 20]</li><lidata-component="feedback">Selection sort is similar to bubble sort (which you appear to have done) but uses fewer swaps</li>
274
+
<lidata-component="answer" id="sorting-practice-quiz-3_opt_a">[7, 11, 1, 6, 12, 8, 14, 18, 19, 20]</li><lidata-component="feedback">Selection sort is similar to bubble sort (which you appear to have done) but uses fewer swaps.</li>
275
275
276
-
<lidata-component="answer" id="sorting-practice-quiz-3_opt_b">[7, 11, 12, 14, 19, 1, 6, 18, 8, 20]</li><lidata-component="feedback">This looks like an insertion sort.</li>
276
+
<lidata-component="answer" id="sorting-practice-quiz-3_opt_b">[7, 11, 12, 14, 19, 1, 6, 20, 8, 18]</li><lidata-component="feedback">This looks like an insertion sort.</li>
277
277
278
278
<lidata-component="answer" id="sorting-practice-quiz-3_opt_c">[11, 7, 12, 14, 1, 6, 8, 18, 19, 20]</li><lidata-component="feedback">This one looks similar to the correct answer but instead of swapping the numbers have been shifted to the left to make room for the correct numbers.</li>
0 commit comments