Results for “variables”

Showing 21–30 of 53

  1. Challenge

    What arrived?

    …each value to the type it should have, into the new variables named in the comments, then print each new value and its type: altitude_km: 408 <class 'int'> speed_kms: 7.66 <class 'float'> crew: 3…

    Write the code Easy 3 stages type() data types type conversion sensor data
  2. Article Mini projects

    Medical dispenser - Don’t trust the user

    …secret. Set MEDICATION_DISPENSER_SECRET environment variable for production.") return secret def _compute_hmac(self, message): """Compute HMAC-SHA256 of message using device secret""" return hmac.new(…

  3. Challenge

    Alert level

    …check the exact boundaries, then store the level in a variable for a status line.

    Write the code Easy 2 stages if elif else comparisons
  4. Article Python Fundamentals

    Nested Loops in Python

    …differently. Common Beginner Mistakes Mistake 1: Same Variable Names # BAD - inner loop overwrites x! for x in range(3): for x in range(3): # ← Overwrites outer x print(x) Python won't throw an error…

  5. Article Python Fundamentals

    Python Functions for Beginners

    …greet_crew is the name. The rules are the same as for variable names: lowercase letters, words joined with underscores, no spaces, and it can't start with a number. The parentheses () are where inputs…

  6. Article Python Fundamentals

    A Practical Guide to Getting Started with Programming

    …need: Basic arithmetic Simple algebra (understanding variables) Logic skills (if this, then that) Problem-solving ability How do I learn math for programming? While basic math skills are helpful, you…