Project 24: Calendar UI
Python Challenge
Builds on these lessons
Step 1 of 3
Project
Zipping a Calendar Export
Write a calendar.ics file into a zip archive with zipfile.ZipFile("export.zip", "w"). Bundling an export into a single zip is friendlier to download and email as one attachment than shipping several loose files.
🎯 Your Task
Please add the exact code shown in the light gray box below to your editor.Do not delete your previous code, just insert these new lines in the correct place!
import zipfile
ics_content = "BEGIN:VCALENDAR\nEND:VCALENDAR"
with zipfile.ZipFile("export.zip", "w") as zf:
zf.writestr("calendar.ics", ics_content)
print("Export written to export.zip")