# Set Mini Project — Attendance Tracker
# enrolled set, present set, absent via set difference
# redhorndev.com

# ─────────────────────────────────────────────
# Setup
# ─────────────────────────────────────────────

enrolled = {"Raven", "Wolf", "Ghost", "Viper", "Bull"}
present  = set()

# ─────────────────────────────────────────────
# Mark attendance
# ─────────────────────────────────────────────

while True:
    name = input("Mark present (or 'done'): ").capitalize()

    if name == "Done":
        break
    elif name not in enrolled:
        print(f"{name} is not on the enrolled list.")
    elif name in present:
        print(f"{name} is already marked present.")
    else:
        present.add(name)
        print(f"{name} marked present.")

# ─────────────────────────────────────────────
# Summary — set difference does the heavy lifting
# ─────────────────────────────────────────────

absent = enrolled - present     # enrolled but not present

print("\n--- Attendance Report ---")
print(f"Present ({len(present)}): {', '.join(sorted(present))}")
print(f"Absent  ({len(absent)}): {', '.join(sorted(absent))}")
print(f"Total enrolled: {len(enrolled)}")
