Skip to main content
PRACTICE / AUTOMATING IT OPERATIONS / LESSON 01

Automation Projects & Git Workflows.

Five independent Python challenges: validate a device record, preserve uncertainty in probe responses, reject unsafe plans, check exact authorizations, and summarize operational evidence.

5 coding challengesReal PythonChanged input fixturesNo live infrastructure

Real Python, fictional operations: This isolated browser workbench tests your own functions and does not contact any device or use real credentials. The separate local Git exercise belongs in the written lesson.

JOELEARNS / PYTHON WORKBENCH

Write it. Run it. Understand it.

Real Python execution, a variable trace and feedback against the requirements. You write the code—answers aren't revealed up front.

Python 3.14 · in-browser
CHALLENGE 01 / 5 · INTERMEDIATE

Validate one operational target

Write normalized_target(row). Accept only dictionaries with exactly the keys host, ipv4, and team. All three values must be nonempty strings after trimming; ipv4 must parse as an IPv4 address with ipaddress.ip_address. Return a NEW dict with uppercase trimmed host, canonical ipv4 and lowercase trimmed team. Return None for malformed input, IPv6, missing/extra fields or wrong types. Do not alter the input row. Print the host for the fictional sample.

EXPECTED OUTPUTAPP-01
script.py editableCtrl / Cmd + Enter to run
Your code is stored only in session storage when enabled. Never paste secrets. Clearing this option clears saved drafts, not the editor.
Code executes only when you choose Run or Check. No account needed.
HINTS · OPTIONAL

Try solving it before asking for help. Hints never show a completed program.

PYTHON OUTPUTReady

Your printed output and errors will appear here.

VARIABLE TRACER

Run the code, then step through the executed lines to watch variable values change.

About this environment: The Python runtime is loaded on demand from a version-pinned CDN and runs inside a sandboxed, opaque-origin browser frame. Runs have a time limit. OS/network automation is outside this introductory workbench. If your code calls input(), a response panel appears to supply text to those calls. Don't paste secrets or untrusted scripts.

When you have completed the challenges, use the shared Continue Your Learning Path panel below to mark Practice complete and continue to Lesson 02.

CONTINUE YOUR LEARNING PATH · AUTOMATING IT OPERATIONS

Ready for Phase 02?

You've reached the end of this Practice module. The next guided step is Network Discovery & Connectivity. You can review your answers or revisit the lesson, but you don't need to return to the course roadmap to find what comes next. Next: milestone 3 of 12.

Your completion marks are saved in this browser only.