Results for “write”

Showing 61–70 of 95

  1. Challenge

    Date and time from a timestamp

    …of day out of it, then show them the way the ground team writes dates. Date and time Slice the date and the time of day out of the timestamp and print them: Date: 2026-03-14 Time: 09:30:05 The date is…

    Write the code Easy 2 stages strings slicing indexing timestamp
  2. Article Python Fundamentals

    Python If/Else for Beginners

    …condition types 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…

  3. Challenge

    Legacy script

    Every mission has one: the script written the night before launch that everybody still runs and nobody dares to touch. This one prints the daily engine report. It repeats the same twelve lines for…

    Fix the code Hard 2 stages project refactoring functions testing
  4. Challenge

    Log formatter function

    …then the format has been copied into every program that writes to the log, and each copy has drifted a little. Put the format in one function that returns the line, then see what happens when the…

    Fix the code Easy 2 stages functions def return refactoring
  5. Challenge

    Sort by a field

    …Kestrel-7 2026-12-01 Tern-5 2027-01-18 Polaris Cargo 4 Write launch_date(launch) , which returns launch["date"] , and pass it to sorted(launches, key=launch_date) , without brackets after its name…

    Write the code Easy 2 stages functions sorted key reverse
  6. Challenge

    Ground station pick

    …longitude, then make the scheduler cope with longitudes written the other common way. Three bands Each station covers a band of longitudes. Pick the one the spacecraft is over and print it: from 60 to…

    Write the code Easy 2 stages if elif else ranges
  7. Challenge

    Log line format

    Every system on Python One writes to the mission log, one line per event. Engineers search those logs, tools filter them by level, and alarms go off when an ERROR line appears. That only works if…

    Write the code Easy 2 stages f-strings print logs formatting
  8. Challenge

    Path in a config

    …and \telemetry . Get the paths to print the way Windows writes them. Raw string Run the script and look at the output: the path is split across two lines, with a strange gap in the middle. Fix the…

    Fix the code Easy 2 stages raw strings escape sequences paths print
  9. Article Mini projects

    Converting Temperatures in Python

    …How to make these conversions 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…