Week 1 Assignment: The Profile Generator
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 andinput()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 (
.pyfile) 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:
- Create a folder named
assignmentsfor all your course assignments. Inside thisassignmentsfolder, create a subfolder namedweek_1_assignment. In theweek1subfolder, create a new Python file with the name specified in your assigned variant below. - Write a program that prompts the user for at least five different pieces of information.
- 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.
- 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". - Finally, push your final commit (containing the working solution) to your
assignmentsrepository on GitHub. - You will submit the link to your
assignmentsGitHub 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:
- Full Name
- Home Planet
- Species
- ID Number (e.g., a sequence of numbers they make up)
- 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:
- Character’s Name
- Character’s Class (e.g., Wizard, Rogue, Barbarian)
- Hometown
- Primary Quest Item
- 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:
- Agent’s Codename
- Agent’s Real Name
- Assigned Gadget
- Mission Location
- 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:
- Recipe Name
- Chef’s Name
- Cuisine Type (e.g., Italian, Mexican)
- Main Ingredient
- 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:
- Player’s Name
- Team Name
- Player’s Position (e.g., Quarterback, Center)
- Jersey Number
- 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:
- Creature Name
- Discovered Planet
- Creature’s Diet (e.g., Solar Radiation, Rocks)
- Lead Scientist’s Name
- 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:
- Artist/Band Name
- Tour Name
- City
- Date & Time (e.g., “October 31, 8:00 PM”)
- 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:
- Robot Model Name (e.g., “RX-1000”)
- Primary Function (e.g., “Deep Sea Exploration”)
- Creator’s Name
- Power Source (e.g., “Fusion Core”)
- 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:
- Artifact Name (e.g., “The Serpent Crown”)
- Historical Period (e.g., “Late Bronze Age”)
- Country of Origin
- Year of Acquisition
- 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:
- Outlaw’s Name
- Known Alias (e.g., “The Ghost Rider”)
- Crime Committed (e.g., “Train Robbery”)
- Reward Amount (e.g., “$5000”)
- 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:
- Character Name
- Character Class (e.g., Sorcerer, Knight, Archer)
- Home Realm (e.g., “Whispering Woods”)
- Special Ability (e.g., “Fireball”)
- 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:
- Pet’s Name
- Animal Type (e.g., Dog, Cat, Rabbit)
- Age (as text, e.g., “2 years old”)
- Favorite Toy
- 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:
- Customer’s Name
- Drink Name (e.g., “Iced Caramel Macchiato”)
- Drink Size (e.g., “Grande”)
- Any special requests? (e.g., “Oat milk”)
- 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.