← My workspaceIndustry project explorerCourse standardsContent Trainer Studio
INDUSTRY CONTEXT. DEMONSTRABLE SKILLS.

Learn a skill.
Put it to work.

Choose your discipline and business context. Foundation pilots and three advanced paths include written instruction, runnable starter files, acceptance criteria and version-linked evidence.

Explore the three advanced text/project paths →

Your learning context

Use the supplied business case to learn the method, then adapt the independent task to retail. The required competencies and acceptance criteria remain unchanged. Your selected context is saved with each evidence submission.

Pilot • text lesson • self-reported evidence

Validate a business request with Python

Version: sample-software-v1 · Next content review: 2026-10-22

The business case

A regional retailer accepts stock adjustment requests. Invalid quantities create inaccurate stock records. The store supervisor needs a predictable validation function before a request reaches approval. This module validates input only; backend permissions are a later prerequisite-gated project milestone.

Before you begin

What you will demonstrate

  1. Return a clear result for valid and invalid adjustment quantities.
  2. Demonstrate boundary cases with repeatable tests.

Lesson

A business rule describes a condition the system must enforce. Here, quantity must be a nonzero integer between -20 and 20. Python bool values behave like integers in some contexts, so use type(value) is int when the rule excludes True and False. Return a result rather than printing inside the function so callers can reuse it. Worked example: def valid(value): return type(value) is int and value != 0 and -20 <= value <= 20. This function does not establish who may approve an adjustment. Authorization must later be checked on the server for every protected operation.

Text alternative / lesson overview

Text-first module: read the explanation, run the starter, write tests, and document the business rule. No video is available for this pilot.

Follow the checkpoints

  1. Download the software starter kit below. Run python software_starter.py; the unfinished check intentionally fails.
  2. Guided: write a function taking quantity and returning a boolean using the rule in the lesson.
  3. Run checks for -20, 20, zero, 21, a string, True, and an empty value. Explain each result.
  4. Independent: adapt the permitted range for an industry you select, state your rule, and add a new failing case before fixing it.
  5. Document the boundary between validation and approval authorization.

Resources and starter files

Starter code is intentionally unfinished. Download and run it locally; SkillProof does not execute arbitrary code or provide cloud infrastructure in this release.

Acceptance criteria

  1. Valid nonzero integers at both limits pass; zero, out-of-range quantities, strings, booleans and None fail.
  2. The supplied tests pass and at least one learner-authored failing case is demonstrated before correction.

Assessment rubric

Check your understanding

A worker can hide an approval button in the browser. What protects the approval operation?

Practice feedback only. This question does not certify independent project competence.

Change request

The supervisor changes the allowed range to -10 through 10. Add tests that would catch the previous limits and update your implementation.

Portfolio deliverables

Tools, permissions and content provenance

Python 3.11+; standard library only. SQLite 3 for data extension. Docker Compose v2 for optional DevOps extension.

Original SkillProof instructional example. All organizations and records are synthetic. Starter kits may be adapted for learner portfolios.

Record your evidence

Save only material you are permitted to share. Evidence is private to your account and labeled self-reported. Saving does not automatically award competence or a credential.

Your evidence library

Only your own saved evidence appears here. Sign in to save records. Exports include the information you entered; review before sharing.