Welcome to the workplace team. The meeting-room booking API needs a calendar behind it. The API in booking/day_calendar.py is agreed and stubbed out, booking/times.py is waiting for a time type, and the rules are in READ…
Welcome to the workplace team. The meeting-room booking API needs a calendar behind it. The API in booking/day_calendar.py is agreed and stubbed out, booking/times.py is waiting for a time type, and the rules are in README.md.
Build both levels in 35 minutes. The checks are graded one by one, so each part you get working counts even if the rest is not done.
check_availability(start, end) books a free slot and returns its id, counting up from 1; it returns -1 for a clash or a bad range.bookings() lists every booking as [id, start, end], earliest first.book_time("HH:MM", "HH:MM") books with times of day, with "24:00" as the end of the day, and returns -1 for text that is not a time.cancel(booking_id) frees the slot; ids are never reused.free_slots(min_length) lists the free stretches of the day at least that long, earliest first.pytest tests/visible. The hidden checks cover clashes, edge times and free slots in more detail.Visible test command
pytest tests/visibleThe repository’s own tests. Run all tests includes them, and so does every submission.
Repository
calendar-booking-check-availability-and-free-slots
Changes under src/ are evaluated.