Challenge
Filter the log
…only the WARN and ERROR entries with append(), then let a minimum level decide what counts, the way logging tools filter by severity.
Showing 11–20 of 38
Challenge
…only the WARN and ERROR entries with append(), then let a minimum level decide what counts, the way logging tools filter by severity.
Article Mini projects
…In 2012, a major trading firm lost $440 million in 45 minutes [source] partly because their system logic relied on timing assumptions that failed catastrophically. More seriously, several medical…
Article Mini projects
Learn how to calculate the minimum speed needed to escape a planet's gravity using Python. We'll build a complete calculator that works for any celestial body, from simple formulas to an interactive…
Article Python Fundamentals
…# km per second seconds = distance_km / speed_of_light minutes = seconds / 60 return seconds, minutes sec, mins = signal_delay(225_000_000) print(f"A message to Mars takes about {round(mins, 1)}…
Example
Operator // for floor division and % for remainder (modulo) in Python.
Example
Simple way to check installed Python version on your system. First step for every programmer.
Challenge
…holds Add the time left to each launch, as days, hours and minutes, and mark a launch on hold: Upcoming launches: 4 2026-11-05 09:10 UTC Aurora Relay (KASA) in 0d 01h 10m 2026-11-05 14:30 UTC Lumen-3…
Challenge
The cabin CO2 sensor sends a reading every minute, and the list of readings only grows. The crew's dashboard doesn't want all of them: it shows the five most recent, so a change is easy to spot. Slice…
Example
Function can return multiple values as a tuple. Unpacking on assignment.
Example
Docstrings describe what a function does. Good programming practice.