mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 06:25:23 +01:00
Update README.md
This commit is contained in:
12
README.md
12
README.md
@@ -46,12 +46,12 @@ If you wish to create a worksheet, you can use the [worksheetgen](https://github
|
|||||||
from mathgenerator import mathgen
|
from mathgenerator import mathgen
|
||||||
from worksheetgen.wg import Worksheet
|
from worksheetgen.wg import Worksheet
|
||||||
|
|
||||||
worksheet = Worksheet("Worksheet title")
|
ws = Worksheet("Worksheet title")
|
||||||
worksheet.add_instruction("Instructions")
|
with ws.section('Section 1', description='These are instructions')
|
||||||
# Writes 10 problems generated with id 1, [0] at the end specifies to take problem, and not solution.
|
# Writes 10 problems generated with id 1, [0] at the end specifies to take problem, and not solution.
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
worksheet.add_problem(mathgen.genById(1)[0])
|
ws.add_problem(mathgen.genById(1)[0])
|
||||||
worksheet.write_pdf()
|
ws.write_pdf()
|
||||||
```
|
```
|
||||||
This creates the pdf `ws.pdf` in your current directory
|
This creates the pdf `ws.pdf` in your current directory
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user