Results for “version”

Showing 1–10 of 20

  1. Challenge

    Environment check

    Every useful bug report starts with the Python version. Ask Python for it with the platform and sys modules and print it the way python --version does.

    Write the code Easy 3 stages platform sys python version bug report
  2. Challenge

    Test the error

    …passes only when fuel_needed(-5) raises ValueError, so a version that returns a value or raises the wrong error fails it, then pin down the message and the lengths that must still work.

    Write the code Medium 2 stages testing assert try except
  3. Article Mini projects

    Medical dispenser - Don’t trust the user

    …that survives restarts and detects tampering. This version uses proper HMAC authentication, stores real timestamps, and maintains an append-only audit trail. import hmac import hashlib import json…

  4. Challenge

    Wrong line commented out

    A real check is commented out and a debug line is left on. Use # comments to put the pre-flight checklist script back in order. A beginner Python challenge on comments.

    Fix the code Easy 2 stages comments debugging print
  5. Article Python Fundamentals

    Python Functions for Beginners

    …code for years, so don't lose sleep over it. The short version: the parameter is the slot in the definition, the argument is the actual value you send in when you call. More than one parameter…

  6. Article Mini projects

    Calculating Escape Velocity in Python

    …velocity from Earth: {escape_velocity/1000:.1f} km/s") Version 1: Reusable Function Instead of copying code for each planet, let's create a function: import numpy as np def…

  7. Article Python Fundamentals

    How to Start Programming in Python Fast

    …Visit the official Python website and download the latest version. Remember to check " Add Python to PATH " during installation. For MacOS : Use Homebrew with the command brew install python , or…