🕵️‍♂️ Mini Project: Secret Agent ID Card Generator

Time limit: 1 hour

Chapters covered: 1 – Basics, 2 – Variables & Operators, 3 – Strings

Difficulty: Beginner‑friendly & fun

Goal: Produce a console program that asks the user for information and prints a formatted Secret Agent ID Card.


đź“‹ Problem Statement

Design a Python script that, after collecting a few details from the user, displays a hacker‑style ID card for a secret agent.

The card must show the real name, a masked code name, joining year, mission status, and a custom ID string.

Required Features (Must‑Have)

# Requirement Chapter Concept
1 Display a welcome message using print() Chapter 1
2 Collect four inputs: real name, secret code name, joining year, mission status Chapter 2 – input() & type casting
3 Mask the code name by showing only its first three characters followed by five asterisksmasked = code[:3] + "*****" Chapter 3 – slicing
4 Convert the mission status to UPPER‑CASE before printing Chapter 3 – string methods
5 Create an ID string by concatenating the uppercase code name with the last two digits of the year, separated by a dashID = CODE.upper() + "-" + year[-2:] Ch 2 (operators) & Ch 3 (slicing, methods)
6 Use an f‑string and escape sequences (\\n, etc.) to print the final card exactly like the sample below Chapter 3 – f‑strings & escapes
7 Program must run without errors and produce the correct format All

đź’Ž Bonus (Pick any)

  1. Random Agent Number – import the random module and attach AGT‑XXXX to the ID card.
  2. Text‑to‑Speech – use pyttsx3 to announce: "ID Generated. Welcome, Agent ___."
  3. Password Gate – ask for a pass‑phrase (SPY2025) and validate with logical operators before proceeding.

🖥️ Sample Interaction (Minimum Requirements)

*** Welcome to Spy ID Generator ***
Enter your real name: Prathamesh Nalge
Enter your secret code name: Phantom28
Enter your joining year: 2025
Enter your mission status (Success/Failure): Success

Generating ID...

==============================
||    SECRET AGENT ID CARD   ||
==============================
|| Name       : Prathamesh Nalge
|| Code Name  : Pha*****
|| Joined     : 2025
|| Status     : SUCCESS
|| ID String  : PHANTOM28-25
==============================

(Your output must replicate this layout, but with whatever data the user types.)


🔑 Implementation Hints (No Full Solution!)