Skip to content

A set of (possibly) language-agnostic exercises for computer-science high-school classes.

License

Notifications You must be signed in to change notification settings

lparolari/high-school-assignments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

High School Assignments

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.

Contents

Category Topic Exercise
Imperative programming [^2] Base Date Checker
Print Rectangle
Second Grade Equations
Weighted Average
Functions Time To Ground
Array Search Date
Strings Array
Dynamic Array
Check Sorted
Array Analysis
Tables Visits Table
Struct Football Betting
ADT Optional Int
Queue
File File Splitter
Math Galton Machine
Smallest Multiple
Big Integer
Thousandth Pair Primes
Frac Lowest Terms
Largest Palindrome Product
Recursion Num Word
Projects Snake
Binary String Transmitter
Battleship
Dyn Mem Linked List
Queue
Binary Tree
Binary Tree - Operations
Vectors Queue - Vector
Functional programming High-Order Conversion To Basis
OOP programming Library
Matrix
Strongbox
Binary Criteria [^1]
Metric Conversion [^1]
Geometric Drawer [^1]
Car Class
Polymorphism Inheritance Polymorphic Shapes (easy)
Employees
Painting Shapes
Polymorphic Questions
Web Programming Projects Acme Missiles: Falcon-10
Solar System Simulation
Connect 4
Node Log Processing
Quiz Class
Automata
Functions
Turing Machine
Lectures Node Temperature Sensor
Civics Project Civics
Exam 2021 Documents Document 1
Document 2
Document 3
Document 4
Document 5
Document 6

[^1]: also with inheritance
[^2]: imperative and procedural programming

Installation

Download the repository

git clone git@github.com: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.

Usage

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

  • .dist where you can find a pdf file with the assigmnet instructions, some resources in exercise folder and the solution in the solution folder, and
  • .dist-pdf where 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 <luca.parolari23@gmail.com>

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'.

Strucutre

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.

Strict Conventions

  • every exercise is a directory with the name of exercise in the format name-of-exercise--variant
  • every latex project has a Makefile with the pdf target

Weak Conventions

  • if the exercise has a written solution, it should be contained in the solution directory
  • if the exercise has a base solution with some code, it should be contained in the exercise directory
  • relations between exercises and their context should be excluded from exercise names, list them in the readme instead

Contributing

Pull requests are welcome, every contribute will build a better world for computer science teachers.

Adding an exercise

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 Makefile with the target pdf

should provide

  • an exercise directory with resources for the assigment
  • a solution directory with exercise's solution

Assigment templates

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 git@github.com: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)

Author

Luca Parolari <luca.parolari23@gmail.com>. Computer Science teacher at Liceo Golgi of Breno, Italy.

Disclaimer

⚠️ 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.

License

See LICENSE file.


Usage (LEGACY)

Build C++ assigment and copy .cpp files.

python build.py