Results for “types”

Showing 41–50 of 73

  1. Challenge

    Catch what you expect

    …Change except: to except Exception as error: and print type(error).__name__ in it, to see what is really being caught. Store its name in hidden_error , and the number of readings that are really bad…

    Fix the code Medium 3 stages errors try except ValueError
  2. Example

    Creating Sets

    Sets store only unique elements without a specific order.

    Audio lesson set unique
  3. Article Mini projects

    Python Random Module

    …{details['distance']} million km") print(f"Surface type: {details['surface']}") print(f"Number of moons to explore: {details['moons']}") print(f"Mission duration: {mission_duration} days")…

  4. Article Mini projects

    Converting Temperatures in Python

    …menu using the print() function: print("Choose the type of conversion:") print("1. Temperature in degrees Celsius to temperature in degrees Kelvin.") print("2. Temperature in degrees Fahrenheit to…

  5. Article Python Fundamentals

    A Practical Guide to Getting Started with Programming

    …code editor you have Create a new file called first.py Type this code and save your file: # This is your first program moon_distance = 384400 mars_distance = 225000000 print(f"The moon is…

  6. Challenge

    Sign-up cleanup

    Clean the crew sign-ups for the analogue mission: trim and capitalise names, lower-case emails, then reject sign-ups with no name or a broken email and drop duplicates by email, saying why for each…

    Write the code Medium 2 stages project strings strip split
  7. Article Python Fundamentals

    Python Functions for Beginners

    …Every example below runs as it is. Open the editor and type along rather than just reading. Typing the code yourself sticks far better, and you'll make a few typos that teach you more than the article…