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
{{ message }}
This repository was archived by the owner on Jun 7, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: runestone/common/project_template/_sources/overview.rst
+44-43Lines changed: 44 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -189,44 +189,49 @@ Finally, it is also possible to embed simple questions into the text. These
189
189
questions provide a way for the students to check themselves as they go along. The questions also provide feedback so that you can
190
190
understand why an answer may or may not be correct.
191
191
192
-
193
-
.. mchoice:: 1524142112
194
-
:correct: b
195
-
:answer_a: Peanuts
196
-
:answer_b: Cashews
197
-
:feedback_a: They're ok, but cashews are better.
198
-
:feedback_b: Good job.
199
-
200
-
Peanuts or cashews?
192
+
.. mchoice:: question1_1
193
+
:correct: a
194
+
:answer_a: Python
195
+
:answer_b: Java
196
+
:answer_c: C
197
+
:answer_d: ML
198
+
:feedback_a: Yes, Python is a great language to learn, whether you are a beginner or an experienced programmer.
199
+
:feedback_b: Java is a good object oriented language but it has some details that make it hard for the beginner.
200
+
:feedback_c: C is an imperative programming language that has been around for a long time, but it is not the one that we use.
201
+
:feedback_d: No, ML is a functional programming language. You can use Python to write functional programs as well.
202
+
203
+
What programming language does this site help you to learn?
201
204
202
205
This next type of question allows more than one correct answer to be required. The feedback will tell you whether you have the
203
206
correct number as well as the feedback for each.
204
207
208
+
.. mchoice:: question1_2
209
+
:multipleanswers:
210
+
:correct: a,b,d
211
+
:answer_a: red
212
+
:answer_b: yellow
213
+
:answer_c: black
214
+
:answer_d: green
215
+
:feedback_a: Red is a definitely on of the colors.
216
+
:feedback_b: Yes, yellow is correct.
217
+
:feedback_c: Remember the acronym...ROY G BIV. B stands for blue.
218
+
:feedback_d: Yes, green is one of the colors.
219
+
220
+
Which colors might be found in a rainbow? (choose all that are correct)
205
221
206
-
.. mchoice:: 152414d
207
-
:multiple_answers:
208
-
:correct: a, c
209
-
:random:
210
-
:answer_a: Hi
211
-
:answer_b: Bye
212
-
:answer_c: Aloha
213
-
:feedback_a: Feedback for Hi
214
-
:feedback_b: Feedback for Bye
215
-
:feedback_c: Feedback for Aloha
216
222
217
-
Here is the question...
218
223
219
224
Another type of question allows you as the instructor to ask for a value. You can test for the value using Pythons regular expressions. For example:
220
225
221
226
222
-
.. fillintheblank:: fill1412
227
+
.. fillintheblank:: fill1512
223
228
224
229
.. blank:: blank21
225
-
:correct:\\bblue\\b
226
-
:feedback1: ("\\bred\\b", "You are an awful person.")
227
-
:feedback2: (".*", "(Hint: Sail Norse)")
230
+
:correct:\\b31\\b
231
+
:feedback1: ("\\b25\\b", "That's base 10!")
232
+
:feedback2: (".*", "25 in octal please!")
228
233
229
-
What is the best color?
234
+
What is the value of 25 expressed as an octal number (base 8)?
230
235
231
236
And finally here is a way of giving your students some simple programming problems where the code is already there for them but not indented or in the correct order. Use drag-and-drop to get everthing right.
232
237
@@ -290,17 +295,21 @@ It currently needs at least 4 directives to function: starttimer, revealquestion
290
295
.. timed:: timed1
291
296
:timelimit: 10
292
297
293
-
.. mchoice:: 1524142112
298
+
.. mchoice:: questiontimed1_1
294
299
:timed:
300
+
:answer_a: The value you are searching for is the first element in the array.
301
+
:answer_b: The value you are searching for is the last element in the array
302
+
:answer_c: The value you are searching for is in the middle of the array.
303
+
:answer_d: The value you are searching for is not in the array
304
+
:answer_e: Sequential Search can never be faster than Binary Search.
295
305
:correct: a
296
-
:answer_a: Red pill
297
-
:answer_b: Blue pill
298
-
:feedback_a: Time to see how far the rabbit hole goes.
299
-
:feedback_b: Wrong answer.
300
-
301
-
Choose the red pill or the blue pill...
302
-
306
+
:feedback_a: Only when the search value is the first item in the array, and thus the first value encountered in sequential search, will sequential be faster than binary.
307
+
:feedback_b: In this case a sequential search will have to check every element before finding the correct one, whereas a binary search will not.
308
+
:feedback_c: Results will differ depending on the exact location of the element, but Binary Search will still find the element faster while Sequential will have to check more elements.
309
+
:feedback_d: If the search value is not in the array, a sequential search will have to check every item in the array before failing, a binary search will be faster.
310
+
:feedback_e: When the search value is the first element, Sequential will always be faster, as it will only need to check one element.
303
311
312
+
Under which of these conditions will a sequential search be faster than a binary search?
304
313
305
314
.. mchoice:: 152414d
306
315
:timed:
@@ -320,7 +329,7 @@ It currently needs at least 4 directives to function: starttimer, revealquestion
320
329
321
330
.. blank:: blank21
322
331
:correct:\\b31\\b
323
-
:feedback1: ("\\b25\\b", "NOOOOOOOOO NOT 25")
332
+
:feedback1: ("\\b25\\b", "Octal is not the same as decimal")
324
333
:feedback2: (".*", "You don't know your octal numbers...")
325
334
326
335
What is the octal of 25? Don't say 25.
@@ -329,15 +338,7 @@ It currently needs at least 4 directives to function: starttimer, revealquestion
329
338
:correct: 12
330
339
:feedback1: (".*", "There's no 12 in that string!")
0 commit comments