Results for “comparison”

Showing 1–10 of 18

  1. Challenge

    Flag from config text

    …you added before you check. Modify. Work dry_run out by comparing the text with "True" , so it is a real True or False. With the config saying "False" it must print: Firing the main engine Make…

    Fix the code Easy 3 stages bool if else config
  2. Challenge

    Alert level

    Turn an engine temperature into OK, WARN or CRITICAL with if, elif and else and two thresholds, 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
  3. Challenge

    Manifest diff

    Compare yesterday's and today's cargo IDs with set difference to print what was added and what was removed, then count what stayed with an intersection and print none for an empty change.

    Write the code Easy 2 stages sets difference intersection sorted
  4. Challenge

    Missing reading

    …sensor didn't answer and temperature_c is None . Run it: comparing None with a number stops with a TypeError . Check for None first, so it prints: ENG-2: NO DATA Use temperature_c is None , and move…

    Write the code Medium 2 stages if else None is None
  5. Article Python Fundamentals

    Python If/Else for Beginners

    …Here's what you'll use most often when writing conditions: Comparisons: == , != , < , > , <= , >= Logical operators: and , or , not Membership: in , not in Truthiness: values like 0 , "" , [] , None…

  6. Challenge

    Launch schedule digest

    …, returning the parsed datetime, works for the comparison and as the key for sorted() . strftime("%Y-%m-%d %H:%M") formats a datetime. Time left, and holds Add the time left to each launch, as days…

    Write the code Medium 3 stages project json datetime timedelta