A maths test
Project description
Matt
Matt is a free software (licensed under the GNU GPL v3 (or later)) maths test program. "Matt" (or "MATT") is a recursive acronym for "MATT Arithmetic Training Test".
Installation
Matt depends on:
There are 2 methods of installation: via poetry and via pip:
Installation via poetry
Poetry should handle the installation of dependencies. To install, first clone the git repository, then run:
poetry install
Installation via pip
Pip should handle the installation of dependencies. To install, run:
python3 -m pip install matt
Usage
Run python3 -m matt -h
for help.
Matt accepts the following arguments:
--difficulty
or-d
to set the difficulty (in the format ":"). Thedefault
namespace is reserved for the default difficulties. If unspecified the default isdefault:1
.--operations
or-o
to set the available operations. Operations are seperated by commas, the available operations are:+
: Addition-
: Subtraction*
: Multiplication/
: Division Example:-o +,-
to enable only addition and subtraction.
--minimum
or-m
to set the minumum, default (if not specified in difficulty): 0.--maximum
or-M
to set the maximum, default (if not specified in difficulty): 10. NOTE: The maximum must not be equivalent to the minimum.
Config
Matt has a configuration file, it is written in Python,
and located at $XDG_CONFIG_HOME/matt/config.py
.
By default $XDG_CONFIG_HOME
is set to ~/.config
,
so if you have not set it then it is probably ~/.config/matt/config.py
.
The configuration must provide a difficulty function that accepts 2 parameters:
namespace
(str): The namespace of the difficulty.number
(int): The number of the difficulty.
The difficulty
function must return a dict.
A simple example is:
def difficulty(namespace: str, number: int) -> dict:
if namespace == "manual":
if number == 1:
return {
"operations": ["+", "-"],
"maximum": 20,
"minimum": 10
}
Due to the config file being written in Python, it is extemely configurable, for example:
def difficulty(namespace: str, number: int) -> dict:
if namespace == "automatic":
return {
"operations": ["+", "-", "*", "/"],
"maximum": number * 10
}
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
Built Distribution
Hashes for matt-0.1.1.post4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27c692e2395d06f03c3a89bfec0d3e3e4189756e882c98c0f599458d817433f8 |
|
MD5 | ef16b2be6a6f0b15643c02b7773bd33c |
|
BLAKE2b-256 | 5bf381c4ed6281cf81b21d09b8174b7970d9fddb05698c02d4478e8306566075 |