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: docs/index.md
+35-3Lines changed: 35 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -474,7 +474,8 @@ You'll also notice we are calling a source file to display our slides. These sli
474
474
475
475
[Ines explaines](https://github.com/ines/course-starter-python#slides) how your slide mardown document should be structured.
476
476
477
-
***⚠️ Warning: Be wary of trailing spaces 😵😱!! Although ```---``` may appear to be the same as ```--- ``` they are not and any information placed after the latter will break your slides.***
477
+
***⚠️ Warning: Be wary of trailing spaces 😵😱!!
478
+
Although ```---``` may appear to be the same as ```--- ``` they are not and any information placed after the latter will break your slides.***
478
479
479
480
#### Enbedding Video and Audio
480
481
@@ -530,13 +531,14 @@ Try again! This is incorrect.
530
531
- Each option will live in `<opt>`. If you want to specify a solution option as correct you can give it an argument `correct="true"` otherwise if it's wrong, no argument is needed. ***🔆You can have multiple right answers in a question***
531
532
532
533
533
-
***⚠️ Warning: You must have padding (empty lines) above and below your question text as well as your answer feedback text as shown above._
534
+
***⚠️ Warning: You must have padding (empty lines) above and below your question text as well as your answer feedback text as shown above.***
534
535
535
536
#### 🔆You can have several questions in one exercise container
536
537
537
538

538
539
<fontsize="1"color="grey"> Source: Hayley Boyce @ UBC MDS from https://mcl-dsci-571-intro-machine-learning.netlify.com/module1 </font>
539
540
541
+
<br>
540
542
541
543
The key to having several questions in one exercise container is to give `<choice>` an id.
542
544
```
@@ -591,7 +593,7 @@ your code in `chapter.md` will look like this:
591
593
You can type your question instructions here
592
594
593
595
594
-
<codeblock id="exercise-file-name">
596
+
<codeblock id="coding-question">
595
597
596
598
In this space is where you will write any coding or question hints
597
599
@@ -600,6 +602,36 @@ In this space is where you will write any coding or question hints
600
602
</exercise>
601
603
```
602
604
605
+
This is where things can get a bit tricky. Each coding exercise will require 3 files:
606
+
607
+
-`exc_coding-question.py` -> The code displayed to the student that they will have to fill in
608
+
-`solution_coding-question.py` -> the expected coding solution
609
+
-`test_coding-question.py` -> Tests to see if the input done by the student were correct (output when student clicks "submit")
610
+
611
+
These are all saved in the `exercises` folder.
612
+
613
+
When we want to specify this exercise in the `chapter.md` file in the exercise container, we must only write `id = coding-question`.
614
+
615
+
Ines has explain more of this [here](https://github.com/ines/course-starter-python#codeblock)
616
+
617
+
***🔆You can also have multiple codeblocks in a single exercise container***
618
+
619
+
Code is written in the same way that you would run normal python scripts, with importing packages and self made functions that can be stored stored and imported from the exercise folder.
620
+
621
+
***🔆When you are calling files ***
622
+
623
+
#### Let's talk about importing functions!
624
+
625
+
If you want to import a functions you made the script can be stored in the `exercises` folder. However, since you are running everything from the root of the directory it's crucial you locate yourself into the `exercises` folder. You can do this with the following code.
0 commit comments