Skip to content

A set of Python-based 2D-array teaching tools (koans), intended for self-teaching.

License

Notifications You must be signed in to change notification settings

TEAM-SPIRIT-Productions/2D-Array-Exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2D-Array-Exercises

This is a set of 2D-array teaching tools. It is designed to be done as a solo project, to teach yourself 2D arrays.
There are a total of 4 sets of exercises, intended to be completed in order, which will challenge you to access/mutate 2D Lists in a variety of situations, in Python.
Note: This project assumes that you already have a basic understanding of how functions work!
You will be required to write your code inside of empty functions.

After installing Python 3.6+, run setup.bat in the repository folder to generate the venv with all dependencies. You may use any IDE you like for this project (we use PyCharm), but the automated checking scripts should be run from command line.
We highly recommend Windows Terminal with PowerShell Core!

How To Use

  1. Clone the repository.
    1.1 You can see here for an example.
    1.2 Use either of the following to clone if you're using the above guide, since said guide is from a different project:
    • HTTPS: https://github.com/TEAM-SPIRIT-Productions/2D-Array-Exercises.git
    • SSH: git@github.com:TEAM-SPIRIT-Productions/2D-Array-Exercises.git
  2. Make sure Python is installed
    • If you have Chocolatey, you can just do choco install python to install Python
  3. Run setup.bat
  4. Work on the files in the subfolders (e.g. prob1/exercise.py is exercise 1)
  5. Run the batch file check_solutions.bat to check if your answer is correct
    • Note: The script only alerts you when the answer is wrong.
    • Example of correct answer:

Optional Tools

These are optional software tools that we, ourselves, use.
We recommend using Chocolatey for installing software on Windows.
For latest information, see the official guide.

Chocolatey

This installation guide assumes you're using Windows 10

  1. Start and administrative shell
    • Ctrl + X, release, then hit A
  2. Run the following command (copy and paste):
    • Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
  3. If there are no error, Chocolatey is now installed!
    • You may use choco -? to check if it's working

PowerShell Core

This is our preferred shell!

  1. Start and administrative shell
    • Ctrl + X, release, then hit A
  2. Run the following command:
    • choco install powershell-core
    • Enter either y or a when prompted, to allow Chocolatey to install

PowerShell Core

This is our preferred terminal! It's highly customisable! (see below)

  1. Start and administrative shell
    • Ctrl + X, release, then hit A
  2. Run the following command:
    • choco install microsoft-windows-terminal
    • Enter either y or a when prompted, to allow Chocolatey to install

Windows Terminal + PowerShell Core (KOOKIIE)
Fig. 1: Sample for Windows Terminal + PowerShell Core (KOOKIIE)

Windows Terminal + PowerShell Core (Brandon)
Fig. 2: Sample for Windows Terminal + PowerShell Core (Brandon)

Windows Terminal + PowerShell Core (Brandon)
Fig. 3: Sample for Windows Terminal + PowerShell Core (Brandon)

AOB

For any enquiries/bug reports/suggestions, feel free to file them at the issues page (preferred).
You may alternatively contact the author at KOOKIIE#9770 on Discord.

Disclaimer:

2D-Array-Exercises is an open-source set of Koans intended to be used as an educational tool. 2D-Array-Exercises is non-monetised, and provided as is. Every effort has been taken to ensure correctness and reliability at the time of release. We will not be liable for any special, direct, indirect, or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action if contract, negligence or other tortious action, arising out of or in connection with the use of 2D-Array-Exercises (in part or in whole).

About

A set of Python-based 2D-array teaching tools (koans), intended for self-teaching.

Resources

License

Stars

Watchers

Forks