Skip to main content

Interactive 42-style exam practice shell for Python exercises

Project description

examshell-python

Interactive terminal shell for practising 42-style Python exam tasks. Simulates the real exam environment — timed pressure, blind grading, sequential levels — or lets you work through exercises freely in practice mode.

Features

  • Two modes — Real (exam simulation) and Practice (free training)
  • Automatic gradinggrademe runs your solution against test cases and shows a results table
  • Multi-language task descriptions — each task is described in EN, DE, FR, ES, IT
  • 14 tasks across 6 levels — from easy warm-ups to hard algorithmic challenges
  • Clean terminal UI — built with Rich

Installation

Requires Python 3.10+.

pip install examshell-python

Or install from source:

git clone <repo-url>
cd examshell-python
pip install .

Usage

examshell42

On launch you choose a mode:

╭─ Choose your Exam mode ─╮
│ Real mode       (1)     │
│ Practice mode   (2)     │
╰─────────────────────────╯

Real mode

Simulates the actual exam. Tasks are drawn randomly per level. Each correct solution earns +16 points; reach 100 to pass.

Command Description
grademe Check your solution
status Show current task info again
finish End the exam

Practice mode

Work through all tasks in any order, retry freely, no score pressure.

Command Description
grademe Check your solution
list Show all available tasks
choose Pick a task by number
skip Move to the next task
status Show current task info again
finish End the practice session

How it works

When a session starts, examshell creates a working directory (exam42/) with two sub-folders:

exam42/
├── subjects/
│   └── <task_name>/
│       ├── <task_name>.en.txt   ← task description + signature + examples
│       ├── <task_name>.de.txt
│       └── ...
└── rendu/
    └── <task_name>/
        └── <task_name>.py       ← put your solution here

Write your solution in rendu/<task_name>/<task_name>.py, then run grademe. The shell imports your file, executes each example against it, and prints a pass/fail table.

Tasks

Level Difficulty Task
1 Easy py_bracket_validator — validate bracket pairs ()[]{}
1 Easy py_cryptic_sorter — custom sort logic
2 Easy py_echo_validator — string validation
2 Easy py_mirror_matrix — matrix mirroring
3 Medium py_hidenp — hidden number problem
3 Medium py_inter — intersection of sequences
3 Medium py_number_base_converter — base conversion
3 Medium py_pattern_tracker — pattern detection
4 Medium py_anagram — anagram check
4 Medium py_shadow_merge — merge operations
4 Medium py_string_permutation_checker — permutation check
5 Hard py_string_sculptor — string transformation
5 Hard py_twist_sequence — sequence manipulation
6 Hard py_whisper_cipher — cipher encoding

Dependencies

  • pydantic ≥ 2.0 — task data models
  • rich ≥ 13.0 — terminal UI

Project structure

src/examshell/
├── __init__.py
├── __main__.py
├── main.py           # CLI entry point, mode logic, UI screens
├── models.py         # Pydantic models (Task, Description, Example)
├── task_generator.py # TaskManager: file creation, grading, task selection
├── config.py
└── data/
    └── data.json     # All task definitions

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

examshell_python-0.1.7.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

examshell_python-0.1.7-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file examshell_python-0.1.7.tar.gz.

File metadata

  • Download URL: examshell_python-0.1.7.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for examshell_python-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e3b5fb896471bba06b0462d9a45450dbfcca30566cab1b95f87120d26c31c7a2
MD5 f3711ba847ac0a32e843fe53c871e584
BLAKE2b-256 601fa5016944881c0767bf891f622cb58c981d9b61386e348c6ab7e3995667c1

See more details on using hashes here.

File details

Details for the file examshell_python-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: examshell_python-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for examshell_python-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b91fed785eb714022b00cbac002650fba6ad47bbc722bdc356414d72066ff3c0
MD5 d94b8d53b8e4000d10eb707fc6eb2ad2
BLAKE2b-256 a8ed2630e674190b5006745366ae0f1e1e6672d8afc1f7ea3c323e3fb9d7f59e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page