The Python challenge folders contain small programming tasks designed to run directly in Termux.

Install the challenge CLI

cd Tools/Htb-Cli
chmod +x setup.sh
./setup.sh

Standard workflow

  1. Open a level under Labs/Python/Python-Challenges.
  2. Read its README and restate the required input and output.
  3. Create solution.py in the level folder.
  4. Test normal, empty and invalid input.
  5. Run the local checker and redeem the returned flag.
htb test solution.py -l 1
htb redeem -m python -l 1 -f YOUR_FLAG
htb progress

Skills practiced

The levels cover output, input, conditions, loops, functions, files and simple data processing. Do not hardcode expected flags merely to pass a test; explain why the program works.

05 · Python Basics

Continue learning

Back to Smartphone Academy