This repository is a collection of exercises for computer science course in high school classes (2hrs of lectures per week). All exercises have their own description provided with a pdf file that can be delivered as an assignment and optionally some resources. The description should be self-contained.
[^1]: also with inheritance
[^2]: imperative and procedural programming
Download the repository
git clone [email protected]:lparolari/high-school-assignments.git
(Optional) Add a python virtualenv and install dependencies
# add the virtual environment
virtualenv .venv
# or, with
python3 -m virtualenv .venv
# activate it
source .venv/bin/activate
# install dependencies
pip install dryable
You may install docker package, see https://github.com/blang/latex-docker.
Requirements
- make
- python (>= 3.8)
- docker
- latex (optional, depending on the build system you choose)
Compile sources
In order to compile all the source run the following command
python build.py
This will generate two directories
.distwhere you can find a pdf file with the assigmnet instructions, some resources inexercisefolder and the solution in thesolutionfolder, and.dist-pdfwhere you can find all assigmnet instructions in one folder.
The script uses the command make pdf in order to build an exercise
and copies to the target output directory all the .pdf files from
the source directory plus the folder exercise and the folder
solution if existing.
Please use python build_new.py --help for more informations.
$ python build.py --help
usage: build_new.py [-h] [--dry-run] [-v]
Welcome to the building script for the high school assignments.
You can build assignments source with a single command.
(C) Luca Parolari <[email protected]>
optional arguments:
-h, --help show this help message and exit
--dry-run Do a trial run with actions performed.
-v, --verbose Increase output verbosity.
As an alternative to the commandline, params can be placed in a
file, one per line, and specified on the commandline like
'build_new.py @params.conf'.
The repository is a collection of exercises and it uses some conventions in order to simplify some task such as build or delivery. If you can, please use strict conventions and also weak conventions.
- every exercise is a directory with the name of exercise in the
format
name-of-exercise--variant - every latex project has a
Makefilewith thepdftarget
- if the exercise has a written solution, it should be contained in
the
solutiondirectory - if the exercise has a base solution with some code, it should be
contained in the
exercisedirectory - relations between exercises and their context should be excluded from exercise names, list them in the readme instead
Pull requests are welcome, every contribute will build a better world for computer science teachers.
In order to add an exercise you should follow conventions above. However, every exercise can be different from the other but it...
must provide
- a
Makefilewith the targetpdf
should provide
- an
exercisedirectory with resources for the assigment - a
solutiondirectory with exercise's solution
programming-exercise-template
A latex template for exercises. You can find the source code at https://github.com/lparolari/programming-exercise-template.
For a quick start run
git clone [email protected]:lparolari/programming-exercise-template.git exercise-name
cd exercise-name
rm -rf .git .travis.yml LICENSE README.md
For more info, please refer to programming-exercise-template/README.md.
markdown-exercise
WIP (for now, use as an example solar-system-simulation)
Luca Parolari <[email protected]>. Computer Science teacher at Liceo Golgi of Breno, Italy.
⚠️ This repository is not intended to be a complete and professional support to teachers. It is only a collection of some exercises with solutions and eventually some notes. The repository may (and probably is) full of imprecision and errors. Take this as is.
See LICENSE file.
Build C++ assigment and copy .cpp files.
python build.py