Results for “info”

Showing 11–20 of 21

  1. Challenge

    Log formatter function

    …The output must stay exactly the same: [T+00:12:05] INFO Engines nominal Define the function at the top: def format_log(t, level, msg): , with return f"..." inside, using its own parameter names. Then…

    Fix the code Easy 2 stages functions def return refactoring
  2. Article Mini projects

    Python Random Module

    …# Get planet details planet_info = planets[destination] return destination, planet_info # Let's try our space lottery! planet, details = select_random_destination() Making It More Interesting What if…

  3. Challenge

    Extra log fields

    …key=value , in the order they were passed: [T+00:12:05] INFO Engines nominal [T+00:14:47] ERROR Fuel valve 2 not responding valve=2 pressure_kpa=310 Add **fields after msg . Inside, fields is a dict…

    Write the code Medium 2 stages functions **kwargs keyword arguments dictionaries
  4. Challenge

    First error

    Scan the mission log for the first ERROR entry, print its line number with enumerate() and stop there with break, then report how many lines were checked, or that there were no errors at all.

    Write the code Easy 2 stages for loop break enumerate flags
  5. Article Python Fundamentals

    Python print() Function

    …print() function helps you display this basic yet crucial information on your computer's console. Your first message to Mission Control Let's start with the basics. Here's how to send your first…

  6. Article Mini projects

    Converting Temperatures in Python

    …Before we start writing code, we need to determine what information we'll need from the program user: Which temperature they want to convert: Celsius or Fahrenheit to Kelvin. What is the value of this…

  7. Article Python Fundamentals

    Python Functions for Beginners

    …its uses, but most of the time you want to hand it some information and let it work with that. def greet_astronaut(name): print(f"Welcome aboard, {name}.") greet_astronaut("Ada")…

  8. Article Python Fundamentals

    A Practical Guide to Getting Started with Programming

    …begginers ! What are variables really? Variables store information you want to use later. Here's what you need to know: # Numbers speed = 28000 # Whole number temperature = -45.2 # Decimal number #…