Welcome to HTW Code Edition — a beginner-friendly bug-fixing challenge for first-year programmers.
Your task is to inspect each program, reproduce its incorrect behaviour, identify the bug, and submit a fix. The source files intentionally contain bugs. They are not examples of correct solutions.
- Open the GitHub Issue linked below for your challenge.
- Read the expected behaviour and reproduce the problem using the provided example.
- Fix the program while keeping the intended behaviour and input/output format.
- Test normal cases and edge cases.
- Submit your fix according to the event organiser's instructions. Do not post solutions publicly while the event is running.
Please do not publish solutions or spoilers in issue comments. Ask for hints in the issue if needed.
| Issue | File | Difficulty | Points |
|---|---|---|---|
| Issue #1 — Sum of Numbers | C/01-sum-of-numbers.c | Easy | 5 |
| Issue #2 — Even or Odd | C/02-even-or-odd.c | Easy | 5 |
| Issue #3 — Largest of Three | C/03-largest-of-three.c | Medium | 10 |
| Issue #4 — Multiplication Table | C/04-multiplication-table.c | Easy | 5 |
| Issue #5 — Count Positive Numbers | C/05-count-positive-numbers.c | Medium | 10 |
| Issue #6 — Grade Calculator | C/06-grade-calculator.c | Medium | 10 |
| Issue | File | Difficulty | Points |
|---|---|---|---|
| Issue #7 — Number Guessing | Python/01-number-guessing.py | Medium | 10 |
| Issue #8 — Simple Calculator | Python/02-simple-calculator.py | Easy | 5 |
| Issue #9 — Countdown Counter | Python/03-countdown-counter.py | Easy | 5 |
C programs can be compiled with GCC:
gcc C/01-sum-of-numbers.c -o challenge
./challengeRun a Python program with Python 3:
python3 Python/01-number-guessing.pyChoose the matching file for the issue you are working on. Each issue contains a reproduction example and the expected behaviour, but not the solution.
Each issue carries one difficulty label and one points label:
difficulty:easyordifficulty:mediumpoints:5orpoints:10
Have fun, test carefully, and happy debugging!