Compare two revisions of: Python

... ... @@ -49,9 +49,9 @@ def sum(n):
49 49 ]{sum}
50 50 ```
51 51
52 -### inlcude
52 +### include
53 53 Defines an include for a whole Python problem or a question of it `\include{lid}`
54 -* `lid` is the lid of the Python script that is meant to be included
54 +* `lid` is the lid of the [Python script](#python-scripts) that is meant to be included
55 55
56 56 ### includeAnswer
57 57 Defines an include of an answer for a question in a Python problem `\includeAnswer[forced]{sum}`. The argument `forced` can be used to configure consequential errors. In case the user answered the answer's question wrong, the sample solution is included. If the argument `forced` is set, the user's answer is included, even if the answer's question is wrong.
... ... @@ -71,6 +71,10 @@ Specifies the grade and feedback for a certain evaluator exit code. `\pythongrad
71 71 \pythongrading{12}{0.0}{The determinant is not zero}
72 72 ```
73 73
74 +### Python scripts
75 +
76 +For the sake of reusability and separation of concerns, you can create Python scripts in WebMiau which you can then include in Python problems with the [include command](#include). Python scripts are just pure Python code.
77 +
74 78 # Python in articles
75 79 ### pythoninput
76 80 Creates an input field for Python code
... ... @@ -100,9 +104,5 @@ Creates a text field for output from Python `\pythonoutput{width}{height}`
100 104 * `width` the size of the field in columns
101 105 * `height` the size of the field in rows
102 106
103 -# Python scripts
104 -
105 -Todo
106 -
107 107 # WebMiau Example
108 108 [Example](https://miau.mumie.net/web-miau/editor/content%2Fexamples%2Fprogramming%2Fpython%2Fprb_simple_python_problem.src.tex)
109 109