Coding katas are short, repeatable programming challenges to help you practice your coding skills. This project provides several katas in Python, each with its own test file. You will implement each kata by following the instructions in the corresponding Python file.
Learn GitHub (YouTube):
- GitHub Tutorial For Beginners - GitHub Basics for Mac or Windows & Source Control Basics
- How to Use GitHub - Full Beginner's Tutorial
If you don't have git installed, please install it first:
- On Ubuntu/Debian:
sudo apt-get update sudo apt-get install git
- On MacOS (with Homebrew):
brew install git
- On Windows: Download and install from git-scm.com
Learn Git (YouTube):
If you prefer a graphical interface for git, you can use GitHub Desktop:
- Download and install GitHub Desktop from desktop.github.com
- Open GitHub Desktop and sign in with your GitHub account.
- To add your cloned repository:
- Click on "File" > "Add Local Repository..."
- Browse to the folder where you cloned this project (e.g.,
katas) - Click "Add Repository"
- You can now manage your branches, commits, and pushes via the GitHub Desktop interface.
Learn GitHub Desktop (YouTube):
git clone git@github.com:alimulondo/python-code-katas.git katas
cd kataspip install -r requirements.txtBefore you start coding, create and switch to a branch called dev:
git checkout -b devPlease complete the exercises in the following order:
- FizzBuzz (
src/katas/fizz_buzz.py) - Prime Factors (
src/katas/prime_factors.py) - Read/Write JSON (
src/katas/read_write_json.py) - Roman Numerals (
src/katas/roman_numerals.py) - String Calculator (
src/katas/string_calculator.py) - Unique String Finder (
src/katas/unique_string_finder.py) - Env Secret Generator (
src/katas/env_secret_generator.py) - Array Diff (
src/katas/array_diff.py)
Open each file and follow the beginner-friendly instructions inside. Write your solution in the space provided.
Each kata has its own test file in the tests/ directory. You can run all tests or a single test file.
python -m unittest discover tests -p '*_test.py'For example, to run only the FizzBuzz tests:
python -m unittest tests/fizz_buzz_test.pyReplace fizz_buzz_test.py with the test file you want to run.
After you finish all exercises, you can commit your changes and push your dev branch to your fork or repository.
git add .
git commit -m "Complete code katas"
git push origin devHappy coding! If you get stuck, read the instructions in each file carefully and try running the tests for hints.