Selaa lähdekoodia

solution end tag should not be the last of the cell.

Claudio Gomes 6 vuotta sitten
vanhempi
commit
c10f2c9381

+ 1 - 1
materials/README.md

@@ -6,7 +6,7 @@ This repository contains the materials that are used in the MoDELS tutorial of p
 
 1. Install [Docker](https://www.docker.com/).
 
-2. Using docker's console, navigate to the root of this repository.
+2. Using docker's console, navigate to `materials` folder in this repository.
 
 3. Build the corresponding docker image (each requires about 5GB of disk space): 
     ```

+ 5 - 3
materials/generate_exercises.ps1

@@ -1,3 +1,5 @@
-& C:\Anaconda3\python.exe .\generate_exercises.py .\1-NewtonsLaws\NewtonsLaws.ipynb
-& C:\Anaconda3\python.exe .\generate_exercises.py .\2-StationaryAction\StationaryAction.ipynb
-& C:\Anaconda3\python.exe .\generate_exercises.py .\3-BondGraphs\BondGraphs.ipynb
+& C:\Anaconda3\python.exe .\generate_exercises.py .\notebooks\1-NewtonsLaws\NewtonsLaws.ipynb
+& C:\Anaconda3\python.exe .\generate_exercises.py .\notebooks\2-StationaryAction\StationaryAction.ipynb
+& C:\Anaconda3\python.exe .\generate_exercises.py .\notebooks\3-BondGraphs\BondGraphs.ipynb
+
+pause

+ 6 - 0
materials/generate_exercises.py

@@ -24,6 +24,9 @@ if __name__ == '__main__':
     
     of = filename+'_exercises'+ext
     
+    print("In file " + f)
+    print("Out file " + of)
+    
     lines = list()
     inSol = False
     with open(f, "r", encoding="utf-8") as ins:
@@ -36,9 +39,12 @@ if __name__ == '__main__':
             if startSol:
                 assert not inSol
                 inSol = True
+                print("Text to ommit:")
             
             if not inSol:
                 outf.write(line)
+            else:
+                print(line)
             
             endSol = EndSolRec.search(line)
             if endSol:

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 39 - 27
materials/notebooks/3-BondGraphs/BondGraphs.ipynb


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 37 - 23
materials/notebooks/3-BondGraphs/BondGraphs_exercises.ipynb