Think. Trace. Solve.
A free, browser-based pseudocode practice platform for placement aspirants.
HTML5 CSS3 Vanilla JavaScript — no backend, no build step, no dependencies.
PseudoPrep helps engineering students prepare for pseudocode / dry-run sections of hiring assessments by practising code tracing — reading a snippet of pseudocode, manually working out the output, and checking yourself against a validated answer key with a full explanation.
It is a complete, self-contained practice product:
- ✍️ 264 original questions across 18 topics and 3 difficulty levels
- ⏱️ Timed tests with an auto-submitting deadline timer
- 🧭 Question palette, mark-for-review, bookmarks, clear-answer
- 📊 Results with topic/difficulty breakdowns and per-question explanations
- 🔁 Review mode — revisit incorrect questions, bookmark, and mark as mastered
- 💾 Local persistence — progress, theme, and attempt history in
localStorage - ♿ Accessible — semantic HTML, keyboard navigable, reduced-motion aware
- 📱 Responsive — works on mobile, tablet, and desktop
⚠️ Disclaimer — PseudoPrep is an independent educational project. All questions are original practice material. It is not affiliated with, endorsed by, or reproducing questions from Infosys (or any other company). No official exam questions, cutoffs, or hiring patterns are claimed.
- Clone or download this repository.
- Open
index.htmlin any modern browser.
That's it. There is no install, no build step, and no server required.
git clone https://github.com/arya-dev2005/pseudoprep.git
cd pseudoprep
# open index.html in your browserOptionally, serve it locally for the cleanest experience:
python3 -m http.server 8000
# then visit http://localhost:8000Open tests.html in a browser. It runs a lightweight self-check on the
core scoring logic (perfect score, unanswered handling, negative marking,
zero-division safety, question-bank schema validation) and prints pass/fail
results on the page and in the console.
pseudoprep/
├── index.html # App structure (all views)
├── style.css # Styling, theming, responsive layouts
├── script.js # Application logic (state, timer, scoring, persistence)
├── questions.js # Original 50-question bank (validated at load)
├── questions2.js # Original 214-question batch, merged into the app pool
├── validate-bank.js # Schema, answer-key, artifact, bias, and arithmetic validator
├── tests.html # Lightweight test harness for core logic
└── README.md
- Home / Dashboard — start a practice or timed test, browse topic-wise categories, and see your progress (attempts, accuracy, weakest topics, recent history). First visit shows an honest empty state, not fake stats.
- Setup — pick a topic, difficulty, question count, and mode. Optional randomization (on by default) and negative marking (off by default). If the bank can't satisfy your selection, you get a clear explanation instead of a broken session.
- Question view — trace the pseudocode in a monospaced, scrollable code block and pick an answer. Navigate freely with Previous/Next or the question palette; answers never get lost. Mark questions for review, bookmark them, or clear an answer.
- Submit — manual submission asks for confirmation and reports how many questions are unanswered. Timed tests auto-submit exactly once when the deadline passes.
- Results — score, correct/incorrect/unanswered counts, accuracy of attempted questions (distinct from score % of the whole test), time taken, topic and difficulty breakdowns, and a full question-by-question review with your answer, the correct answer, and an explanation.
- Review & Revision — filter all questions by topic, difficulty, and status (previously incorrect, bookmarked, mastered). Retake any subset.
Timed tests use a deadline timestamp, not a decrementing counter:
- Refresh mid-test? The session and the original deadline are restored — refreshing cannot reset the clock.
- Time runs out? The test submits exactly once (guarded in code).
- Submit manually first? The timer stops immediately and the same guard prevents duplicate attempt records.
Note: this is a client-side timer, suitable for practice. It is not a tamper-proof, server-enforced exam clock, and this app doesn't pretend to be.
- All progress is stored in your browser's
localStorageunder the versioned keypseudoprep.v1. - No analytics, no accounts, no data ever leaves your device.
- Progress does not sync across devices or browsers, and clearing site data erases it. A Reset all progress option (with confirmation) is built in.
- Corrupted or missing stored data is handled gracefully — the app falls back to defaults with a console warning instead of crashing.
All questions follow one documented convention set (also readable in-app under Conventions):
| Construct | Meaning |
|---|---|
FOR i = a TO b |
Inclusive of both a and b, step +1 (STEP -1 to descend) |
x / y |
Integer division, truncated toward zero (7 / 2 = 3) |
x MOD y |
Remainder (17 MOD 5 = 2) |
AND / OR |
Boolean logic with short-circuit evaluation |
BREAK |
Exits the innermost loop |
CONTINUE |
Next iteration of the innermost loop |
| Arrays / strings | 0-indexed unless a question explicitly says otherwise |
| Functions | Arguments by value; single RETURN value; base case always shown |
Students trace code manually — the site never executes pseudocode and
never uses eval.
- Create a repository on GitHub (e.g.
pseudoprep). - Upload the files to the repository root.
index.htmlmust sit at the root — all asset paths are already relative, so Pages'/reponame/subpath works out of the box. - Go to Settings → Pages.
- Source: Deploy from a branch
- Branch:
main, folder:/ (root) - Click Save.
- Wait 1–2 minutes for the deployment to finish, then open the URL shown on the Pages settings page and verify the app loads. Deployment is only "done" once you've actually seen it working.
- Push updates → they go live automatically once the deployment completes.
| Problem | Fix |
|---|---|
| Page loads with no styling | CSS/JS files aren't at the repo root, or got renamed. Check style.css and script.js sit next to index.html. |
Blank page, console shows QUESTIONS is not defined |
questions.js is missing or failed to load. Check the filename/case. |
| 404 on the Pages URL | Pages may still be building — wait a couple of minutes and hard-refresh (Ctrl+Shift+R). |
| Old version still showing | The deployment may be cached; hard-refresh or wait a minute. |
| Progress vanished | Browser storage was cleared (private mode, "clear site data"). Progress is per-browser by design. |
Core scoring logic is covered by the test harness in tests.html:
- ✅ Perfect score calculation
- ✅ All-unanswered input handled without division by zero
- ✅ Negative-marking math (
+1correct,−0.25wrong) - ✅ Attempted-question accuracy vs whole-test score %
- ✅ Question-bank schema validation (ids, answer indices, options)
- ✅ Duplicate-id detection at load time
Manual testing checklist (click to expand)
- Home shows an empty state on first visit; stats appear after an attempt
- Setup availability counts are accurate; over-asking is blocked with a clear message
- Answers persist across navigation; palette states update live
- Timer auto-submits exactly once at expiry; manual submit cannot double-record
- Refresh mid-timed-test resumes with the original deadline
- Zero-attempt submission shows 0% attempted accuracy — no NaN anywhere
- Retry-incorrect builds a session from exactly the wrong/skipped questions
- Review filters work; bookmarks and mastered flags persist across reloads
- Reset progress (with confirmation) wipes everything
- Corrupt
localStoragedegrades gracefully - Usable at 360px / 768px / 1280px; keyboard-only navigation works
- No console errors during normal use
questions.jsandquestions2.js— pure data. Each question has a stable ID, topic, difficulty, options, a single 0-basedanswerIndex, an explanation, and tags. Both banks are validated at load; when both scripts are included, the 200-question batch is appended toQUESTIONSwhile remaining available separately asQUESTIONS_BATCH2.validate-bank.js— optional validator for schema rules, duplicate options, drafting artifacts, explanation/key consistency, answer-index bias, and safe arithmetic in straight-line questions without usingeval.script.js— one persistedstateobject (prefs, attempts, bookmarks, mastered, recoverable session) plus one ephemeral runtimesession. Scoring lives in a single pure function,computeResults(), shared by the app and the test harness, so graded logic is testable in isolation.- Rendering — every view is built with DOM APIs and
textContent; noinnerHTMLwith dynamic data, noeval, nonew Function. - Storage — one versioned key with shape validation on read and try/catch on write.
- The question bank ships to the browser, so answers are technically inspectable. This is a practice tool, not a proctored exam — and no answer secrecy is claimed.
- Client-side timers are convenience timers, not tamper-proof exam clocks.
- Progress is per-browser/per-device; clearing site data erases it.
- Pseudocode is traced manually by the student; there is no interpreter.
- Optional pseudocode interpreter for auto-graded tracing practice
- Spaced-repetition scheduling for review mode
- Progress export/import (JSON)
- JSON/CSV question import for self-authored banks
- Web Worker–based timer with integrity hashing for stricter timed practice
Suggestions and original question contributions are welcome! If adding questions, please:
- Keep the existing schema (stable
id,topic,difficulty, options,answerIndex,explanation,tags). - Verify each answer by hand-tracing the code.
- Ensure distractors are plausible but clearly wrong.
- Don't reproduce copyrighted question material.
Released under the MIT License.
PseudoPrep — an independent educational project. Not affiliated with or endorsed by Infosys.