Results for “python 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. 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…

  3. 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…

  4. 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
  5. 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…

  6. Article Mini projects

    Converting Temperatures in Python

    …temperatures. In the code tab, you can download the full version of the script. As an additional exercise, you can write functions that convert temperatures from Kelvin to degrees Fahrenheit and…

  7. Article Python Fundamentals

    Nested Loops in Python

    …in a week, you'll instantly understand what the second version does. In the Mars examples, we use names like x_position , y_position , scan_x , rover_id - anything that helps understand the code…

  8. 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…