A tool to generate cloze quizes with random values.
Project description
clozer
Prequisites
- python3
Instalation
pip3 install clozer
Example
Python file (sumquiz.py):
import random
from clozer import Quiz, QuestionVar
class SumQuiz(Quiz):
file = 'template.html'
def __init__(self):
super().__init__()
self._name = 'SumQuiz'
@QuestionVar
def A(self):
return random.randint(1,10)
@QuestionVar
def B(self):
return random.randint(1,10)
@QuestionVar
def C(self):
return self.A + self.B
if __name__ == "__main__":
quiz = SumQuiz()
quiz.store()
Template (template.html):
<p>Solve:</p>
<p>{A}+{B}={{:NUMERIC:={C}}}</p>
Run:
python3 sumquiz.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clozer-0.0.1.tar.gz
(15.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
clozer-0.0.1-py3-none-any.whl
(16.4 kB
view details)
File details
Details for the file clozer-0.0.1.tar.gz.
File metadata
- Download URL: clozer-0.0.1.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1196776fe2d6a2ae0dc548f45d55502854f2a0b00d4b1e17735a689d7d1b43cf
|
|
| MD5 |
54a9a0788377b2ebf9dc24e109a466d8
|
|
| BLAKE2b-256 |
5f55fe703a872295d72786b4edde49580853988ba80dbb50a02ce25b75a94281
|
File details
Details for the file clozer-0.0.1-py3-none-any.whl.
File metadata
- Download URL: clozer-0.0.1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
710d902280ac52eb1d6b475c5f89181dc63bc5d51034f55ea13fc7fc6670c068
|
|
| MD5 |
e5878d02c7178072b0ae95ba6863dc57
|
|
| BLAKE2b-256 |
f1c3a0ad89c9a3d334a7fc4b0f13180134eb628cc4d1868fb2c18857c03b72d8
|