Python Coding Challenges.
Writing Python is different from recognizing syntax. These five small coding tasks give you just enough starter code to begin—and require you to produce the result yourself.
How to use this clinic: Select a challenge, read the requirement, edit the starter code, and choose Run Python. When you're ready, select Check my solution. Variable names, data types and exact console output all matter. Hints are optional; solutions aren't supplied.
Review Fundamentals →Optional: run the same code on your computer →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.
A readable device report
Northstar needs a one-line status label. Use the existing variables to print the device name followed by a colon, a space, the count, and 'ports online'. Match the punctuation exactly.
SW-01: 4 ports onlineTry solving it before asking for help. Hints never show a completed program.
Your printed output and errors will appear here.
Run the code, then step through the executed lines to watch variable values change.
