Example
Import System Modules
Learning to import modules in Python. Modules extend your program capabilities.
Showing 221–230 of 233
Example
Learning to import modules in Python. Modules extend your program capabilities.
Example
Simple way to check installed Python version on your system. First step for every programmer.
Challenge
…for every tank. The bug is fixed, but the prints stayed, and the pre-burn check now buries its one important line, an empty tank, under lines nobody needs. Switch to the logging module, where every…
Challenge
…critical limit of 50. The monitoring code reported WARN, and nobody shut the engine down. Predict what the check prints, find out why the CRITICAL branch never runs, fix it, then write a chain with…
Challenge
…sensors measure the temperature of Python One 's hull, and the thermal control system watches their average. Today the average says 47 °C, while every single sensor reads around 21 °C. Predict what…
Challenge
…to Python One , the console first shows what it's doing and then, once it's finished, how it went. Command-line tools do this all the time: you see Uploading flight plan... while you wait, and done…
Challenge
…launch, the ground software at Mission Control starts up and reports its status. A monitoring program on another computer reads those lines and decides whether everything is fine or someone needs to…
Article Python Fundamentals
…wrestling with all morning. But your laptop is at home, and mobile code editors are... well, terrible. We've all been there. That moment when inspiration strikes at the worst possible time - during…
Challenge
…has grown one condition at a time, each inside the last, and the reason for a refusal now sits four levels deep, at the far end of an else whose if is off the top of the screen. Flatten the function…
Challenge
…has been copied into every program that writes to the log, and each copy has drifted a little. Put the format in one function that returns the line, then see what happens when the format has to…