Results for “sys”

Showing 11–20 of 37

  1. Challenge

    Duplicate events

    …Hatch closed EV-1002 Cabin pressure nominal EV-1003 Abort system armed EV-1004 Switched to internal power Duplicates dropped: 2 Keep the IDs you have already printed in a set: start with seen = set()…

    Write the code Medium 2 stages sets add in deduplication
  2. Challenge

    Numbered checklist

    …1. Seal the hatch 2. Check cabin pressure 3. Arm the abort system 4. Switch to internal power 5. Get a go from Mission Control enumerate(checklist, start=1) gives pairs of a number and an item. Unpack…

    Write the code Easy 2 stages for loop enumerate start lists
  3. Challenge

    Logging instead of print

    The tank check is full of prints left over from debugging. Replace them with logging calls at the right levels, so debug records stay hidden until switched on, then give the fuel code its own named…

    Fix the code Medium 2 stages logging debug info warning
  4. Article Mini projects

    Calculate your weight on different planets in Python

    …program that calculates your weight across the solar system. This beginner-friendly guide takes you through each step, from setting up planet data to user input and weight calculation. Ideal for…

  5. Challenge

    Print the manifest

    …line" you printed one item from a tuple. The logistics system now exports the whole manifest as a list of dicts, one per item, with an ID, a name, a category and a mass. The loading crew wants it…

    Write the code Easy 2 stages dictionaries lists of dicts for loop formatting
  6. Challenge

    Validate a command

    Read a console command with input(), accept start, stop and status in any case with an if/elif chain, print Unknown command for anything else, then handle empty input and show what was typed.

    Write the code Easy 2 stages if elif else input
  7. Article Python Fundamentals

    Python If/Else for Beginners

    …nest if blocks, but keep them readable. fuel_percent = 65 system_check_passed = False if fuel_percent > 50: if system_check_passed: print("Launch!") else: print("Hold: system checks failed.") else…