L13 LAB - TASK CARDS
==========================================================================
Parts 1 to 4 of the template: No AI.
Sending the requests: AI allowed - keep a record.

Pick one task (do another later if you want more practice). For your task:
  1. Copy the VAGUE request into Part 1 of L13_request_template.txt.
  2. Answer the PREDICTION prompt in Part 2. In writing. Before sending.
  3. Copy the PRECISE request into Part 3.
  4. Send the vague request to the assistant exactly as written, in a new
     chat. No additions. Save the reply as L13_task<N>_vague.py.
  5. Send the PRECISE request exactly as written, in another NEW chat.
     Save the reply as L13_task<N>_precise.py.
  6. Run each file once. Then run L13_check_task<N>.py from this folder:
     it calls the function in each reply with every acceptance
     criterion's input and prints MEETS or FAILS. Edit only its lines
     marked CHANGE (reply file names and function names). Fill in Part 4.
All three tasks come from a small regional airline's operations office.
All times, rules and formats below are invented for this exercise; none
is a real airline's or regulator's rule.

--------------------------------------------------------------------------
TASK 1. ZULU TO LOCAL TIME
--------------------------------------------------------------------------
Aviation runs on UTC, which pilots and controllers call Zulu time. The
airline's schedules arrive in Zulu; the crew wants local time.

VAGUE REQUEST
  Write a Python function that converts Zulu time to local time.

PREDICTION PROMPT
  The request does not say what the time looks like, how the offset is
  given, or what happens near midnight. Write down what format you think
  the model will choose, and what it will return for 0300Z with a -7 offset.

PRECISE REQUEST
  Write a Python 3 function zulu_to_local(zulu_hhmm, offset_hours).
  Inputs:
    zulu_hhmm: a string of exactly 4 digits, "HHMM", 24-hour clock,
               hours 00-23, minutes 00-59. Example: "1430".
    offset_hours: a whole number (int) from -12 to 14. Local = Zulu + offset.
  Output: the local time as a 4-digit string "HHMM". Ignore the date.
  Constraints: standard library only. No printing, no input().
  Boundary: results wrap around midnight in both directions.
  Invalid input: raise ValueError for any zulu_hhmm that is not 4 digits
  or is out of range, and for an offset that is not an int in range.
  Acceptance criteria:
    AC1 zulu_to_local("1430", -7) returns "0730"
    AC2 zulu_to_local("0300", -7) returns "2000"
    AC3 zulu_to_local("2200", 3)  returns "0100"
    AC4 zulu_to_local("2400", 0)  raises ValueError
    AC5 zulu_to_local("14:30", -7) raises ValueError

--------------------------------------------------------------------------
TASK 2. CREW REST CHECK
--------------------------------------------------------------------------
The crew scheduler must confirm that a pilot has had enough rest between
one duty period ending and the next one starting ("show time").

VAGUE REQUEST
  Write a function that checks if crew rest is satisfied between two
  duty periods.

PREDICTION PROMPT
  The request gives no minimum rest period and no time format. Write down
  the number of hours you think the model will assume, and whether it
  will treat "exactly the minimum" as enough.

PRECISE REQUEST
  Write a Python 3 function crew_rest_ok(duty_end, next_show).
  Inputs: two strings "YYYY-MM-DD HH:MM", 24-hour clock.
    duty_end: when the previous duty period ended.
    next_show: when the next duty period starts.
  Output: True if the time from duty_end to next_show is at least
  12 hours, otherwise False.
  Constraints: standard library only. No printing, no input().
  Boundary: exactly 12 hours 00 minutes counts as satisfied.
  Invalid input: raise ValueError if either string is not in the format
  above, or if next_show is earlier than duty_end.
  Acceptance criteria:
    AC1 crew_rest_ok("2026-09-01 22:00", "2026-09-02 10:00") returns True
    AC2 crew_rest_ok("2026-09-01 22:00", "2026-09-02 09:59") returns False
    AC3 crew_rest_ok("2026-09-01 22:00", "2026-09-02 20:00") returns True
    AC4 crew_rest_ok("2026-09-02 10:00", "2026-09-01 22:00") raises ValueError
    AC5 crew_rest_ok("2026-09-01 2200", "2026-09-02 10:00") raises ValueError

--------------------------------------------------------------------------
TASK 3. HOURS UNTIL NEXT INSPECTION
--------------------------------------------------------------------------
The maintenance log records each aircraft's total flight hours. Inspections
are due at fixed intervals of flight hours.

VAGUE REQUEST
  Write a function that tells me how many hours until the next scheduled
  maintenance.

PREDICTION PROMPT
  The request does not say what the interval is or what "until" means
  when the aircraft is exactly at an inspection point. Write down the
  interval you think the model will invent, and what it will return for
  an aircraft sitting at exactly 300 hours.

PRECISE REQUEST
  Write a Python 3 function hours_until_inspection(airframe_hours,
  interval_hours).
  Inputs:
    airframe_hours: total flight hours on the airframe, int or float, >= 0.
    interval_hours: hours between inspections, int or float, > 0.
  Inspections fall at every whole multiple of interval_hours counting
  from 0 (100, 200, 300 ... for a 100-hour interval).
  Output: hours remaining until the next inspection, as a float rounded
  to 1 decimal place.
  Constraints: standard library only. No printing, no input().
  Boundary: if airframe_hours is exactly on an inspection point, the
  inspection is due now; return 0.0.
  Invalid input: ValueError if airframe_hours < 0 or interval_hours <= 0.
  TypeError if either argument is not an int or float.
  Acceptance criteria:
    AC1 hours_until_inspection(250.0, 100) returns 50.0
    AC2 hours_until_inspection(300.0, 100) returns 0.0
    AC3 hours_until_inspection(0, 50) returns 0.0
    AC4 hours_until_inspection(-5, 100) raises ValueError
    AC5 hours_until_inspection(100, 0) raises ValueError
    AC6 hours_until_inspection("250", 100) raises TypeError
