Results for “range function”

8 results

  1. Challenge

    Config loader

    …over a copy of the defaults, check each value's type and range and report every problem in one go, then wrap it all in a load_config() that never crashes, even on broken JSON.

    Write the code Hard 3 stages project json configuration validation
  2. Challenge

    Test the pipeline

    …from "Telemetry pipeline" has been split into small functions, ready for the ground station to run unattended. Before it goes live, the team wants tests: whoever changes the pipeline next must find…

    Write the code Hard 2 stages project testing assert try
  3. Article Mini projects

    Calculating Escape Velocity in Python

    …Instead of Regular Python? While Python's built-in math functions work fine for simple calculations, NumPy offers several advantages for scientific computing: More efficient for large-scale…

  4. Article Mini projects

    Medical dispenser - Don’t trust the user

    …= 3 # Lower limit for testing for i in range(5): result = quick_dispenser.request_dose() print(f"Dose attempt {i+1}: {result}") if i < 4: # Don't wait after last attempt time.sleep(1.1) print("\n===…

  5. Article Python Fundamentals

    Python If/Else for Beginners

    …consider combining conditions or extracting logic into functions. Chained comparisons Python supports expressions like a < b < c , which are evaluated sensibly: altitude = 1200 if 1000 < altitude <…