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

Algorithms and Problem Solving · hard · 40 XP

Binary Search Probes

2 tests

You are given a sorted list of n integers and a target. Run a classic binary search (lo starts at 0, hi at n-1, mid = (lo+hi)//2) and print one line per probe exactly as: `lo=L hi=H mid=M -> V OP T` where V is arr[mid], T is the target and OP is <, > or ==. Stop as soon as a probe compares equal. Then print `Found T at index I in K probes` on success or `T not found after K probes` on failure; K counts every probe line printed (always the word `probes`, even for K = 1).

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.