Skip to content
ComputerCS
Start learning

Computer Science and Entrepreneurship · Practice

Programming challenge bank

219 Python coding challenges, retained alongside the full PECTAA curriculum. Filter the existing Python challenge bank by its mapped textbook unit, run visible and hidden tests, and keep your solved record and code drafts.

219 challenges6 difficulty tiers0 solved0 attempted0 XP earned

Loading saved progress…

Open full IDE

Python Programming · hard · 40 XP

Inventory Manager

2 tests

Manage a small shop. Line 1 holds n and m; the next n lines hold `product qty` for the starting stock; then come m transactions `product delta`, where a positive delta is a restock and a negative one is a sale. Apply the transactions in order: a sale that would push the stock below zero is skipped and counted. Finish by printing every product's final stock sorted by product name as `product qty`, then `Skipped sales: K`. Transactions naming unknown products are ignored entirely (not counted as skipped).

Python IDE

Python development workspace

Write, run, debug and manage Python projects directly in your browser.

Editor
python3 — ready
Terminal readyRun your Python file. Output, errors and input echoes will appear here.
Nerdlyy Agent · DisabledDisabled while you work through a lab or practice task so your attempt stays independent.

NERDLYY · FEEDBACK

Help shape Nerdlyy

Your feedback goes directly to the team. We read every submission.

No reply needed — you can send feedback without sharing contact details.