← Introduction to Programming

Week 1 Assignment: The Profile Generator

Assignment Description

Goal: Your task is to write a Python program that gathers information from a user and then generates a formatted, multi-line profile or summary. This assignment is designed to test your ability to synthesize all the skills learned in the first tutorial.

Concepts Tested:

  • Python Fundamentals: Using print() to display text and input() to capture user data.
  • Variable Usage: Storing user input in variables.
  • String Concatenation: Combining strings and variables with the + operator to create dynamic and structured output.
  • Development Environment: Creating and running a Python script (.py file) inside VSCode.
  • Version Control Workflow: Using the complete Git and GitHub workflow to save and submit your work (git add, git commit, git push).

Requirements:

  1. Create a folder named assignments for all your course assignments. Inside this assignments folder, create a subfolder named week_1_assignment. In the week1 subfolder, create a new Python file with the name specified in your assigned variant below.
  2. Write a program that prompts the user for at least five different pieces of information.
  3. Your program must then print a well-formatted, multi-line summary using the data the user provided. The output format must match the example in your variant.
  4. You may make multiple commits as you develop your program. Ensure that your final commit includes the complete, working solution, with a clear and descriptive commit message, for example: git commit -m "Feat: Complete futuristic ID card generator".
  5. Finally, push your final commit (containing the working solution) to your assignments repository on GitHub.
  6. You will submit the link to your assignments GitHub repository for grading.

Variant 1: Futuristic ID Card Generator

Filename: id_card.py

Scenario: Create a program that generates a “Galactic Federation” ID card for a space traveler.

User Prompts: Your program must ask the user for the following information:

  1. Full Name
  2. Home Planet
  3. Species
  4. ID Number (e.g., a sequence of numbers they make up)
  5. Official Rank

Required Output Format: After gathering the inputs, your program must print an ID card that looks exactly like this, using the user’s data.

========================================
    GALACTIC FEDERATION ID CARD
========================================

Full Name:      [User's Full Name]
Home Planet:    [User's Home Planet]
Species:        [User's Species]
Rank:           [User's Official Rank]

----------------------------------------
ID Code: GF-[User's ID Number]-[User's Home Planet]
========================================

Note: For the ID Code, you will construct a new string by combining the static text "GF-" with the ID Number and Home Planet variables provided by the user. This tests your use of string concatenation.


Variant 2: Fantasy Adventurer's Passport

Filename: adventurer.py

Scenario: Create a program that generates a passport for a hero in a fantasy world.

User Prompts: Your program must ask the user for the following information:

  1. Character’s Name
  2. Character’s Class (e.g., Wizard, Rogue, Barbarian)
  3. Hometown
  4. Primary Quest Item
  5. Nemesis’s Name

Required Output Format: After gathering the inputs, your program must print a passport page that looks exactly like this, using the user’s data.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  KINGDOM OF CODERRA - ADVENTURER'S PASSPORT
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Name:      [Character's Name]
Class:     [Character's Class]
Origin:    [Hometown]

Known Alias: The [Hometown] [Class]

----------------------------------------
CURRENT MISSION:
Retrieve the [Primary Quest Item] from the clutches of [Nemesis's Name]!
----------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note: For the Known Alias, you must construct a new descriptive title by combining the user’s Hometown and Class variables between other strings. This tests your ability to concatenate multiple strings and variables together in a single line.


Variant 3: Secret Agent Dossier Creator

Filename: dossier.py

Scenario: Create a program that generates a “Top Secret” agent dossier for an intelligence agency.

User Prompts: Your program must ask the user for the following information:

  1. Agent’s Codename
  2. Agent’s Real Name
  3. Assigned Gadget
  4. Mission Location
  5. Operation Number (e.g., a number they make up)

Required Output Format: After gathering the inputs, your program must print a dossier page that looks exactly like this, using the user’s data.

****************************************
      TOP SECRET - AGENT DOSSIER
****************************************

Codename:   [Agent's Codename]
Real Name:  [Agent's Real Name]
Gadget:     [Assigned Gadget]

----------------------------------------
MISSION DETAILS:
Operation ID:   OP-[Operation Number]-[Agent's Codename]
Location:       [Mission Location]
----------------------------------------
       *** FOR YOUR EYES ONLY ***
****************************************

Note: For the Operation ID, you will construct a new identifier by combining the static text "OP-" with the Operation Number and the agent’s Codename variables. This tests your use of string concatenation.


Variant 4: Digital Recipe Card Creator

Filename: recipe_card.py

Scenario: Create a program that generates a formatted recipe card based on a chef’s input.

User Prompts: Your program must ask the user for the following information:

  1. Recipe Name
  2. Chef’s Name
  3. Cuisine Type (e.g., Italian, Mexican)
  4. Main Ingredient
  5. Total Prep Time (e.g., “45 minutes”)

Required Output Format: After gathering the inputs, your program must print a recipe card that looks exactly like this, using the user’s data.

++++++++++++++++++++++++++++++++++++++++
          KITCHEN CREATIONS
++++++++++++++++++++++++++++++++++++++++

Recipe:    [Recipe Name]
Cuisine:   [Cuisine Type]
Chef:      [Chef's Name]

Signature Dish: [Chef's Name]'s Famous [Cuisine Type] [Recipe Name]

----------------------------------------
Main Ingredient: [Main Ingredient]
Prep Time:       [Total Prep Time]
----------------------------------------

Note: For the Signature Dish line, you must construct a new string by concatenating the chef’s name, the cuisine type, and the recipe name together with other text, as shown in the example.


Variant 5: Sports Player Trading Card

Filename: player_card.py

Scenario: Create a program that generates a “Legends of the League” trading card for a sports player.

User Prompts: Your program must ask the user for the following information:

  1. Player’s Name
  2. Team Name
  3. Player’s Position (e.g., Quarterback, Center)
  4. Jersey Number
  5. Hometown

Required Output Format: After gathering the inputs, your program must print a trading card that looks exactly like this, using the user’s data.

########################################
       LEGENDS OF THE LEAGUE
########################################

Player:    [Player's Name]
Team:      [Team Name]
Position:  [Player's Position]
Number:    [Jersey Number]

----------------------------------------
Player Tag: [Jersey Number]-[Team Name]-[Player's Name]
Hometown:   [Hometown]
----------------------------------------
########################################

Note: For the Player Tag line, you must construct a unique ID by concatenating the player’s jersey number, team name, and their own name, separated by hyphens.


Variant 6: New Creature Field Report

Filename: field_report.py

Scenario: Create a program for a xeno-biologist to log a new creature discovery on an alien planet.

User Prompts: Your program must ask the user for the following information:

  1. Creature Name
  2. Discovered Planet
  3. Creature’s Diet (e.g., Solar Radiation, Rocks)
  4. Lead Scientist’s Name
  5. Discovery Year

Required Output Format: After gathering the inputs, your program must print a field report that looks exactly like this, using the user’s data.

========================================
     XENO-BIOLOGY FIELD REPORT
========================================

Scientist:      Dr. [Lead Scientist's Name]
Discovery Year: [Discovery Year]

----------------------------------------
Creature Name:    [Creature Name]
Home Planet:      [Discovered Planet]
Primary Diet:     [Creature's Diet]

Scientific Designation: [Discovered Planet]-[Creature Name]-[Discovery Year]
========================================

Note: For the Scientific Designation, you must construct a formal classification code by concatenating the planet name, creature name, and discovery year, separated by hyphens.


Variant 7: Concert Ticket Generator

Filename: concert_ticket.py

Scenario: Create a program that generates a personalized VIP ticket for a music concert.

User Prompts: Your program must ask the user for the following information:

  1. Artist/Band Name
  2. Tour Name
  3. City
  4. Date & Time (e.g., “October 31, 8:00 PM”)
  5. Ticket Holder’s Name

Required Output Format: After gathering the inputs, your program must print a concert ticket that looks exactly like this, using the user’s data.

*************************************************
            -- ADMIT ONE: VIP PASS --
*************************************************

Artist:    [Artist/Band Name]
Tour:      [Tour Name]
Location:  [City]
Date:      [Date & Time]

-------------------------------------------------
Issued to: [Ticket Holder's Name]
Event Code: [Artist/Band Name]-[City]-VIP
-------------------------------------------------
         *** Enjoy the Show! ***
*************************************************

Note: For the Event Code, you must construct a unique identifier by concatenating the artist’s name, the city, and the static text “-VIP”, separated by hyphens.


Variant 8: Robot Specification Sheet

Filename: robot_specs.py

Scenario: Create a program for an engineer to generate a specification sheet for a new robot model.

User Prompts: Your program must ask the user for the following information:

  1. Robot Model Name (e.g., “RX-1000”)
  2. Primary Function (e.g., “Deep Sea Exploration”)
  3. Creator’s Name
  4. Power Source (e.g., “Fusion Core”)
  5. Serial Number (e.g., a number they make up)

Required Output Format: After gathering the inputs, your program must print a specification sheet that looks exactly like this, using the user’s data.

========================================
      ROBOTICS DIVISION - SPEC SHEET
========================================

Model:          [Robot Model Name]
Serial Number:  [Serial Number]
Creator:        [Creator's Name]

Full Designation: [Creator's Name]'s [Robot Model Name]

----------------------------------------
Primary Function: [Primary Function]
Power Source:     [Power Source]
----------------------------------------
       STATUS: OPERATIONAL
========================================

Note: For the Full Designation line, you must create a formal name by combining the creator’s name and the robot’s model name with other text, as shown in the example.


Variant 9: Museum Artifact Label

Filename: museum_label.py

Scenario: Create a program to generate a display label for a new artifact in a museum exhibit.

User Prompts: Your program must ask the user for the following information:

  1. Artifact Name (e.g., “The Serpent Crown”)
  2. Historical Period (e.g., “Late Bronze Age”)
  3. Country of Origin
  4. Year of Acquisition
  5. Museum Wing (e.g., “Hall of Antiquities”)

Required Output Format: After gathering the inputs, your program must print a museum label that looks exactly like this, using the user’s data.

--------------------------------------------------
      THE NATIONAL MUSEUM OF HISTORY
--------------------------------------------------

Artifact:      [Artifact Name]
Origin:        [Country of Origin]
Period:        [Historical Period]
Acquired:      [Year of Acquisition]

Catalog Number: ACQ-[Year of Acquisition]-[Country of Origin]

--------------------------------------------------
Location: [Museum Wing]
--------------------------------------------------

Note: For the Catalog Number, you must generate an official ID by combining the static prefix “ACQ-“ with the year of acquisition and the country of origin, separated by hyphens.


Variant 10: Old West Wanted Poster

Filename: wanted_poster.py

Scenario: Create a program that generates a classic “Wanted: Dead or Alive” poster for an outlaw in the Old West.

User Prompts: Your program must ask the user for the following information:

  1. Outlaw’s Name
  2. Known Alias (e.g., “The Ghost Rider”)
  3. Crime Committed (e.g., “Train Robbery”)
  4. Reward Amount (e.g., “$5000”)
  5. Last Seen Location

Required Output Format: After gathering the inputs, your program must print a wanted poster that looks exactly like this, using the user’s data.

****************************************
      WANTED: DEAD OR ALIVE
****************************************

Name:     [Outlaw's Name]
Alias:    [Known Alias]

Wanted For: [Crime Committed]
Last Seen:  [Last Seen Location]

----------------------------------------
REWARD: [Reward Amount]
----------------------------------------
Issued by: The Sheriff's Office of [Last Seen Location]
****************************************

Note: For the final line, Issued by:, you must construct a new string by concatenating the static text with the Last Seen Location variable provided by the user.


Variant 11: Video Game Character Creator Summary

Filename: character_bio.py

Scenario: Create a program that generates a summary screen for a newly created character in a role-playing game (RPG).

User Prompts: Your program must ask the user for the following information:

  1. Character Name
  2. Character Class (e.g., Sorcerer, Knight, Archer)
  3. Home Realm (e.g., “Whispering Woods”)
  4. Special Ability (e.g., “Fireball”)
  5. Chosen Weapon

Required Output Format: After gathering the inputs, your program must print a character summary that looks exactly like this, using the user’s data.

========================================
     -- CHARACTER CREATION COMPLETE --
========================================

Name:     [Character Name]
Class:    [Character Class]
Realm:    [Home Realm]

Title: [Character Name] the [Character Class] of [Home Realm]

----------------------------------------
Weapon of Choice: [Chosen Weapon]
Special Ability:  [Special Ability]
========================================

Note: For the Title line, you must create the character’s full title by combining their name, class, and home realm with other text, as shown in the example.


Variant 12: Pet Adoption Profile

Filename: pet_profile.py

Scenario: Create a program for an animal shelter to generate a profile for a pet that is up for adoption.

User Prompts: Your program must ask the user for the following information:

  1. Pet’s Name
  2. Animal Type (e.g., Dog, Cat, Rabbit)
  3. Age (as text, e.g., “2 years old”)
  4. Favorite Toy
  5. Shelter Name

Required Output Format: After gathering the inputs, your program must print an adoption profile that looks exactly like this, using the user’s data.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          -- ADOPT ME! --
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hi, my name is [Pet's Name]!

I am a [Age] [Animal Type].
My favorite toy is a [Favorite Toy].

Come meet me today at the [Shelter Name]!

----------------------------------------
Adoption ID: [PET'S NAME]-[ANIMAL TYPE]-[SHELTER NAME]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note: For the Adoption ID, you must generate a unique code by concatenating the pet’s name, animal type, and the shelter name, separated by hyphens.


Variant 13: Coffee Shop Order Ticket

Filename: coffee_order.py

Scenario: Create a program that takes a customer’s coffee order and prints a formatted ticket for the barista.

User Prompts: Your program must ask the user for the following information:

  1. Customer’s Name
  2. Drink Name (e.g., “Iced Caramel Macchiato”)
  3. Drink Size (e.g., “Grande”)
  4. Any special requests? (e.g., “Oat milk”)
  5. Order Number (e.g., a number they make up)

Required Output Format: After gathering the inputs, your program must print an order ticket that looks exactly like this, using the user’s data.

----------------------------------------
        THE CODER'S CAFE
----------------------------------------

Order #:    [Order Number]
Customer:   [Customer's Name]

Drink:      [Drink Name]
Size:       [Drink Size]
Requests:   [Any special requests?]

----------------------------------------
Barista Call-Out: "One [Drink Size] [Drink Name] for [Customer's Name]!"
----------------------------------------

Note: For the Barista Call-Out line, you must construct the full sentence by combining the customer’s name, drink size, and drink name variables with the surrounding text and punctuation.