🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.

Project 8: Event Invitation

Python Challenge
Step 1 of 3
Project

A Dataclass for the Event

Define @dataclass class Event: with title, date, and guests fields. @dataclass auto-generates __init__, __repr__, and __eq__ from the field list — none of the boilerplate a plain class would need for the exact same data-holding job.

🎯 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!

from dataclasses import dataclass

@dataclass
class Event:
    title: str
    date: str
    guests: int

party = Event(title="Summer Rooftop Party", date="2026-07-18", guests=24)
print(party)