Build a Holiday Gift Budget Manager
Build a Python CLI that tracks holiday gifts and keeps spending on budget.
Introduction
30 Second Summary
Holiday shopping gets harder when gift ideas live in scattered notes while the running total stays in your head. One extra purchase can push the plan past its limit.
In this project, you will build a terminal-based holiday gift manager with Python. Your program turns a list of recipients into a live budget status after each new gift.
What You'll Build
Picture the terminal refreshing your holiday plan with the newest gift plus an immediate verdict on your $150.00 budget.
By the end of this project, you'll have:
- A terminal workflow that captures one new gift plan for a recipient at the price you enter.
- A readable gift summary showing every recipient's planned present. The same report displays total spending.
- A live budget status showing how much money remains. A percentage tracks how much of the budget is used. A clear warning appears when spending crosses the limit.
- Secret Mission: Add a dedicated workflow that safely updates an existing recipient's gift details.
Are there any prerequisites?
You'll need a Mac running macOS 10.15 or later. Visual Studio Code must already be installed with permission available for software installation.
Before We Start
Before the hands-on work begins, lock in who this holiday gift manager can help. Your answer gives every Python concept a practical budget problem to solve.
Set Up Python and Your Project
Your holiday gift manager needs a current Python interpreter before it can process any gift data.
This step confirms that the official installer supports your Mac. It also gives the project a reliable workspace in Visual Studio Code.
In this step, get ready to:
- Confirm that your Mac supports the official Python installer.
- Install Python 3.15.2 with its certificate helper.
- Create a Visual Studio Code workspace that can run the new interpreter.
Confirm compatibility and install Python
The official installer supports macOS 10.15 or later. Your system version determines whether this installer can run safely.
- Click the Apple menu in the upper-left corner of your screen.
- Choose About This Mac.
- Read the macOS version shown in the window.
- Confirm that the version is 10.15 or later.
A supported version confirms that your Mac can use the installer selected for this project.
Is your Mac below the requirement?
The installer requires macOS 10.15 or later.
- Update macOS to a supported version before continuing.
- Check whether your Mac model supports a newer macOS release.
Help me check whether my Mac can meet the installer requirement.
- Open the official Python 3.15.2 release page in your browser.
- Confirm that the macOS installer supports macOS 10.15 and later.
- Click macOS installer to download the package.
- Open the downloaded .pkg file.
- Complete the standard installation prompts.
Why use the official installer?
The official package provides a direct installer for your Mac. It also includes the certificate setup used in this project.
Finding the certificate helper is a little fiddly because it lives inside Python's application folder.
- Open Finder from the Dock.
- Press Cmd+Shift+G to open the folder location field.
- Enter /Applications/Python 3.15/ in the field.
- Press Return to open the folder.
- Double-click Install Certificates.command.
The helper runs in a Terminal window. You should see Successfully installed certifi followed by update complete.
That hidden setup is complete. Python now has the certificates it needs for secure connections.
Create the project workspace
A dedicated folder keeps the gift manager separate from your other files. Visual Studio Code uses that folder as the project's workspace.
- Click the Desktop to make Finder active.
- Click File in the menu bar.
- Click New Folder.
- Enter holiday-gift-manager as the folder name.
- Press Return to create the folder.
Good progress. The holiday-gift-manager folder now gives your project a reliable home on the Desktop.
- Press Cmd+Space to open Spotlight.
- Type Visual Studio Code into the search field.
- Press Return to open Visual Studio Code.
- Click File in the top menu bar.
- Click Open Folder.
- Double-click the holiday-gift-manager folder on your Desktop.
You should see holiday-gift-manager at the top of the Explorer sidebar. This confirms that the folder is open as your workspace.
- Select the new-file control beside holiday-gift-manager in the Explorer sidebar.
- Enter holiday_gift_manager.py as the file name.
- Press Return to create the file.
You should see an empty holiday_gift_manager.py editor tab. The file is ready for the gift data you add in the next step.
✔️ Awesome, I've got everything!
Your holiday-gift-manager workspace now contains an empty holiday_gift_manager.py file.
ⓧ I'd like to double check the full code
The complete holiday_gift_manager.py file is empty at this checkpoint. Its editor should contain no characters.
- Remove any characters from holiday_gift_manager.py.
- Save holiday_gift_manager.py.
Restart Visual Studio Code and verify Python
Visual Studio Code was available before Python was installed. Restarting it gives the integrated terminal a fresh path to the new interpreter.
- Press Cmd+Q to quit Visual Studio Code.
- Press Cmd+Space to open Spotlight.
- Type Visual Studio Code into the search field.
- Press Return to reopen Visual Studio Code.
- Click File in the top menu bar.
- Click Open Folder.
- Double-click the existing holiday-gift-manager folder on your Desktop.
You should see the workspace name in the Explorer sidebar again.
- Click holiday_gift_manager.py in the Explorer sidebar.
- Click Terminal in the top menu bar.
- Click New Terminal.
Before you run the check, which Python version do you expect the fresh terminal to report?
- Check the interpreter available to your workspace by running this command:
python3 --version
What does this command check?
The command asks which Python interpreter responds to python3. Running it in the new terminal confirms that Visual Studio Code can find the installation.
✔️ I see Python 3.15.2
You should see Python 3.15.2. That's the environment ready: your workspace can now run the exact interpreter used in this project.
ⓧ I see an older version
An older result means the terminal is still finding a previous Python installation.
- Quit Visual Studio Code.
- Reopen the downloaded .pkg file.
- Complete the standard installation prompts again.
- Run Install Certificates.command from /Applications/Python 3.15/.
The corrected installation needs another fresh Visual Studio Code session.
- Reopen Visual Studio Code from Spotlight.
- Return to the holiday-gift-manager workspace.
- Click Terminal in the top menu bar.
- Click New Terminal.
- Check the interpreter again by running:
python3 --version
What does this recheck prove?
The repeated check confirms which Python installation the restarted editor can access.
You should now see Python 3.15.2.
ⓧ Command not found
An unavailable command means the installation has not reached the fresh terminal.
- Quit Visual Studio Code.
- Open the downloaded .pkg file.
- Complete the standard installation prompts.
- Run Install Certificates.command from /Applications/Python 3.15/.
The completed installation needs a new Visual Studio Code session before the terminal can find it.
- Reopen Visual Studio Code from Spotlight.
- Return to the holiday-gift-manager workspace.
- Click Terminal in the top menu bar.
- Click New Terminal.
- Check the interpreter again by running:
python3 --version
What does this recheck prove?
The repeated check confirms whether the restarted editor can now locate Python.
You should now see Python 3.15.2.
Still missing the required version?
- Confirm that the installer reached its completion screen.
- Confirm that the certificate helper printed update complete.
- Quit Visual Studio Code completely before reopening it.
Help me troubleshoot my Python installation on macOS.
The Python 3.15.2 result proves that your workspace can run the interpreter required by the project.
Your interpreter and workspace are ready. Next, you'll turn the empty file into a visible holiday gift budget summary.
Print Your First Budget Summary
Your workspace is ready. The gift manager can now move from an empty file to its first visible report.
A visible starter report proves that a nested dictionary can connect each recipient to their gift details. A reusable function keeps the total calculation separate from the report.
In this step, get ready to:
- Define the starter budget with its gift data.
- Build a function that totals every gift cost.
- Print the three gifts with the total spending.
Store the starter gift data
The outer gifts dictionary uses recipient names as keys. Each recipient points to a smaller dictionary that holds the planned gift details.
- Place your cursor on line 1 of the empty holiday_gift_manager.py file from earlier.
- Paste this starter data at line 1:
BUDGET = 150.00
gifts = {
"Alex": {"gift": "Board game", "cost": 32.00},
"Jordan": {"gift": "Scarf", "cost": 24.50},
"Sam": {"gift": "Cookbook", "cost": 38.25},
}
What does this code do?
- BUDGET holds the spending limit as a decimal number.
- gifts maps each recipient to one nested dictionary.
- Each nested cost value stays numeric so Python can use it in arithmetic.
- Save holiday_gift_manager.py.
- Confirm the starter data has valid Python syntax by running this command in the VS Code terminal from earlier:
python3 holiday_gift_manager.py
What does this command do?
This command asks Python to read and run holiday_gift_manager.py. It catches syntax problems before you build the report on top of this data.
The terminal returns to a fresh prompt without a traceback. This confirms that the nested dictionary has valid Python syntax.
Seeing a syntax problem?
Check that every opening brace has a matching closing brace. Compare each recipient entry with the code block above.
Check that gift and cost stay inside quotation marks.
Help me fix the starter dictionary in holiday_gift_manager.py.
Calculate the total gift cost
A function parameter receives data for the function to use. A return value sends the calculated result back to the code that requested it.
- Place your cursor two blank lines below the closing brace of gifts.
- Add the total calculation by pasting this function:
def calculate_total(gift_list):
total = 0
for recipient in gift_list:
total = total + gift_list[recipient]["cost"]
return total
How does the total work?
- gift_list receives the dictionary that the function needs to total.
- total starts at 0 before any prices are added.
- for recipient in gift_list visits each outer dictionary key.
- return total sends the completed total back to the caller.
- Save holiday_gift_manager.py.
- Confirm the function has valid Python syntax by running this command in the same VS Code terminal:
python3 holiday_gift_manager.py
What does this check prove?
Python reads the starter data before checking the new function definition. A clean run confirms that the loop has valid syntax.
The terminal returns to a fresh prompt without a traceback. Your calculation function is ready for the report to call.
Seeing an indentation problem?
Make sure the body of calculate_total(gift_list) is indented by four spaces. Indent the line inside the loop by another four spaces.
Help me fix the indentation in calculate_total().
Display the gift summary
The report combines dictionary iteration with formatted output. Each loop pass retrieves one recipient with the nested details needed for that row.
- Place your cursor two blank lines below return total.
- Add the report by pasting this code:
def display_summary(gift_list, budget):
print("\nHOLIDAY GIFT LIST")
print("-" * 40)
for recipient, details in gift_list.items():
print(f"{recipient}: {details['gift']} - ${details['cost']:.2f}")
total = calculate_total(gift_list)
print("-" * 40)
print(f"Total spent: ${total:.2f}")
display_summary(gifts, BUDGET)
How does the report work?
- gift_list.items() retrieves each recipient with the corresponding details dictionary.
- :.2f formats each price with two digits after the decimal point.
- calculate_total(gift_list) provides the total for the final line.
- display_summary(gifts, BUDGET) starts the report with the starter data.
- Save holiday_gift_manager.py.
Before you run the file, which three names do you expect the report to list? What total do you expect from the three prices?
- Run the completed starter report in the same VS Code terminal:
python3 holiday_gift_manager.py
What does this run check?
Python executes the final call to display_summary(gifts, BUDGET). The printed report confirms that the data structure and total function work together.
You should see three gift entries for Alex, Jordan, and Sam. The final line should read Total spent: $94.75.
That is your first working report. Your nested dictionary now feeds a reusable total into formatted terminal output.
Missing a gift or total?
Check that the final display_summary(gifts, BUDGET) call sits outside the function. It should start at the far left with no indentation.
Check that each nested dictionary uses the exact keys gift and cost.
Help me diagnose my gift summary output.
✔️ Awesome, I've got everything!
Great. Double check that holiday_gift_manager.py is saved. Your terminal should show the three starter gifts with a total of $94.75.
ⓧ I'd like to double check the full code
Compare your complete holiday_gift_manager.py file with this version:
BUDGET = 150.00
gifts = {
"Alex": {"gift": "Board game", "cost": 32.00},
"Jordan": {"gift": "Scarf", "cost": 24.50},
"Sam": {"gift": "Cookbook", "cost": 38.25},
}
def calculate_total(gift_list):
total = 0
for recipient in gift_list:
total = total + gift_list[recipient]["cost"]
return total
def display_summary(gift_list, budget):
print("\nHOLIDAY GIFT LIST")
print("-" * 40)
for recipient, details in gift_list.items():
print(f"{recipient}: {details['gift']} - ${details['cost']:.2f}")
total = calculate_total(gift_list)
print("-" * 40)
print(f"Total spent: ${total:.2f}")
display_summary(gifts, BUDGET)
Your starter report now turns structured gift data into a visible spending total. Next, you will collect a new gift through the terminal and see what happens when a recipient name is reused.
Add a Gift and Test Duplicate Keys
Your starter report now turns a nested dictionary into a readable Python summary. A useful gift manager also needs to accept a new plan from the terminal.
You'll collect a complete gift entry inside add_gift(). Then you'll reuse a recipient key to inspect how the list responds.
In this step, get ready to:
- Build a function that collects one gift through terminal prompts.
- Display the plan on both sides of the new input.
- Reuse Alex's dictionary key to expose the duplicate-key problem.
Collect a gift from terminal input
The input() function pauses the program while the learner types a response. Each response starts as text. float() converts the entered price into a number that your calculations can use.
- In holiday_gift_manager.py, locate the closing line of display_summary(gift_list, budget).
- Add add_gift(gift_list) beneath display_summary(gift_list, budget) by pasting this code:
def add_gift(gift_list):
print("\nADD A GIFT")
recipient = input("Recipient name: ")
gift_name = input("Gift name: ")
cost = float(input("Gift price: $"))
gift_list[recipient] = {"gift": gift_name, "cost": cost}
print(f"Added {gift_name} for {recipient}.")
What does this function do?
- The recipient variable holds the name entered at the first prompt.
- The gift_name variable holds the planned gift.
- The cost variable holds the converted numeric price.
- The assignment to gift_list[recipient] stores the gift name and cost together under the recipient key.
- Save holiday_gift_manager.py.
- Return to the Visual Studio Code terminal from earlier.
- Confirm the existing report still runs by using this command:
python3 holiday_gift_manager.py
What does this command check?
This command asks Python to read the saved file from top to bottom. A successful run proves the new function definition has valid syntax without changing the existing starter report.
You'll still see Alex, Jordan, and Sam. The report ends with Total spent: $94.75.
Did the report stop running?
Check that each line inside add_gift() has four leading spaces. Confirm that the closing parentheses and quotation marks match the code above.
Ask for help with the function syntax if the terminal points to a line inside add_gift(). Help me debug the add_gift function in my Python gift manager.
Show the plan before and after input
A function definition makes the input workflow available to your program. Function calls control when the prompts appear relative to each summary.
- At the bottom of holiday_gift_manager.py, find this current line:
display_summary(gifts, BUDGET)
What does the current line do?
This call prints one summary from the starter data. The program currently ends immediately after that report.
- Replace that line with this before-and-after flow:
print("BEFORE ADDING A GIFT")
display_summary(gifts, BUDGET)
add_gift(gifts)
print("\nUPDATED PLAN")
display_summary(gifts, BUDGET)
How does the new flow work?
- The first call to display_summary() captures the original plan.
- The call to add_gift() pauses for one new gift entry.
- The final call to display_summary() reveals how that entry changed the dictionary.
- Save holiday_gift_manager.py.
Reuse a recipient key
A dictionary can contain each key only once. Your final assignment uses the entered recipient name as that key.
Before you run the program, which result do you expect? Will Alex become a fourth entry, or will the existing entry change?
- Return to the Visual Studio Code terminal from earlier.
- Run the updated program by using this command:
python3 holiday_gift_manager.py
What happens during this run?
Python prints the starter plan before it reaches add_gift(gifts). The program then pauses at each input prompt before printing the updated plan.
- Enter Alex at the Recipient name: prompt.
- Enter Puzzle at the Gift name: prompt.
- Enter 40.00 at the Gift price: $ prompt.
You'll see three recipients under UPDATED PLAN. Alex now shows Puzzle - $40.00.
The original Board game - $32.00 entry is gone. The new total is Total spent: $102.75.
Why did the original gift disappear?
The assignment to gift_list[recipient] stores a value at one unique key. Alex already occupied that key.
Assigning the new nested dictionary replaced the old one. This overwrite is the intended shortfall that your test was designed to expose.
Didn't see Alex change?
Confirm that you saved holiday_gift_manager.py before running it. Enter Alex with the same capital letter used in the starter dictionary.
If the price conversion stops the program, run it again. Enter only 40.00 at the price prompt.
Use this troubleshooting prompt if your two summaries still match. Help me find why the duplicate Alex key is not replacing the original gift.
✔️ Awesome, I've got everything!
Great work. Your saved program now collects a gift between two summaries, and your duplicate-key test shows Alex's replacement entry.
ⓧ I'd like to double check the full code
Compare your complete holiday_gift_manager.py file with this reference:
BUDGET = 150.00
gifts = {
"Alex": {"gift": "Board game", "cost": 32.00},
"Jordan": {"gift": "Scarf", "cost": 24.50},
"Sam": {"gift": "Cookbook", "cost": 38.25},
}
def calculate_total(gift_list):
total = 0
for recipient in gift_list:
total = total + gift_list[recipient]["cost"]
return total
def display_summary(gift_list, budget):
print("\nHOLIDAY GIFT LIST")
print("-" * 40)
for recipient, details in gift_list.items():
print(f"{recipient}: {details['gift']} - ${details['cost']:.2f}")
total = calculate_total(gift_list)
print("-" * 40)
print(f"Total spent: ${total:.2f}")
def add_gift(gift_list):
print("\nADD A GIFT")
recipient = input("Recipient name: ")
gift_name = input("Gift name: ")
cost = float(input("Gift price: $"))
gift_list[recipient] = {"gift": gift_name, "cost": cost}
print(f"Added {gift_name} for {recipient}.")
print("BEFORE ADDING A GIFT")
display_summary(gifts, BUDGET)
add_gift(gifts)
print("\nUPDATED PLAN")
display_summary(gifts, BUDGET)
What should match?
The first half keeps your starter data and summary functions. The final section collects one entry between the two reports.
You found the risky edge case in your gift manager. Next, you'll protect existing recipients before finishing the budget calculations.
Protect Gifts and Calculate Budget Status
The duplicate Alex test exposed a real data-loss risk. A nested dictionary keeps one value for each key.
Assigning Alex again erased the original gift. This step protects existing entries before turning the spending total into a clear budget status.
In this step, get ready to:
- Protect existing recipients from accidental replacement.
- Calculate the budget status from the spending total.
- Display the complete budget report with an over-budget warning.
Protect existing recipients
A membership check lets add_gift inspect the recipient before collecting the replacement details. An early return keeps the original nested dictionary intact.
- In holiday_gift_manager.py, find the function that begins with def add_gift(gift_list):.
- Replace the entire add_gift function with the code below:
def add_gift(gift_list):
print("\nADD A GIFT")
recipient = input("Recipient name: ")
if recipient in gift_list:
print(f"{recipient} already has a gift. No changes were made.")
return
gift_name = input("Gift name: ")
cost = float(input("Gift price: $"))
gift_list[recipient] = {"gift": gift_name, "cost": cost}
print(f"Added {gift_name} for {recipient}.")
How does this guard work?
- The if recipient in gift_list condition checks whether the entered name already exists as a key.
- The warning explains why the gift stays unchanged.
- The return statement stops add_gift before it asks for replacement details.
- Save holiday_gift_manager.py.
Before you test this, do you expect the program to ask for another gift after it recognizes Alex?
- Switch back to the VS Code terminal from earlier. Run the program with this command:
python3 holiday_gift_manager.py
- Enter Alex at the Recipient name prompt.
You'll see Alex already has a gift. No changes were made. The program returns to the final summary without requesting more gift details.
Alex still appears with the Board game. The total remains Total spent: $94.75.
That closes the overwrite gap. Alex's original gift now stays intact.
Does Alex still get replaced?
- Check that the if block is indented inside add_gift.
- Place the duplicate check before the line that collects gift_name.
- Confirm that return lines up with the warning's print statement.
Help me debug my duplicate recipient check.
Calculate the budget status
The spending total becomes more useful when it is compared with the budget. A dedicated function calculates the money left plus the percentage used.
- In holiday_gift_manager.py, find the calculate_total function.
- Add the new function directly below return total by pasting this code:
def calculate_budget_status(budget, total):
remaining = budget - total
percentage_used = (total / budget) * 100
return remaining, percentage_used
What does this function calculate?
- The remaining value holds the difference between the budget and total spending.
- The percentage_used value converts the spending total into a percentage of the budget.
- The return statement sends both results back to the report.
- Save holiday_gift_manager.py.
- Confirm the new function loads successfully by running the program again:
python3 holiday_gift_manager.py
- Enter Alex at the Recipient name prompt.
The program reaches both summaries without a syntax problem. You'll also see the duplicate warning again.
Seeing a syntax problem?
- Match the indentation of the three lines inside calculate_budget_status.
- Keep calculate_budget_status outside calculate_total by aligning both def lines.
- Keep one blank line inside the pasted function only where shown.
Help me fix my budget status function.
Finish the budget report
The report already receives the budget through its budget parameter. The finished version uses that value to explain whether the plan is affordable.
- Find the function that begins with def display_summary(gift_list, budget):.
- Replace the entire display_summary function with the code below:
def display_summary(gift_list, budget):
print("\nHOLIDAY GIFT LIST")
print("-" * 40)
for recipient, details in gift_list.items():
print(f"{recipient}: {details['gift']} - ${details['cost']:.2f}")
total = calculate_total(gift_list)
remaining, percentage_used = calculate_budget_status(budget, total)
print("-" * 40)
print(f"Budget: ${budget:.2f}")
print(f"Total spent: ${total:.2f}")
print(f"Budget used: {percentage_used:.1f}%")
if remaining < 0:
print(f"Status: Over budget by ${0 - remaining:.2f}")
else:
print(f"Status: ${remaining:.2f} remaining")
How does the report decide its status?
- The call to calculate_total adds every gift price.
- The call to calculate_budget_status stores its two returned values in remaining plus percentage_used.
- The currency format .2f keeps money values at two decimal places.
- The percentage format .1f keeps budget usage at one decimal place.
- The condition checks whether remaining is below zero before choosing a status message.
- Save holiday_gift_manager.py.
Before you run this, will a new $75 gift fit inside the money left from the starter plan?
- Run the finished manager with this command:
python3 holiday_gift_manager.py
- Enter Taylor at the Recipient name prompt.
- Enter Headphones at the Gift name prompt.
- Enter 75 at the Gift price prompt.
You'll see four recipients in the updated plan. Taylor appears with Headphones at $75.00.
The report shows Budget: $150.00. It also shows Total spent: $169.75.
The line Budget used: 113.2% shows how far the plan has passed the limit. You'll see Status: Over budget by $19.75 beneath it.
Your manager now protects existing gifts while turning every new price into a budget decision. That's the complete shopping workflow working from one terminal run.
Is the over-budget status missing?
- Enter 75 without a currency symbol so float() can convert it.
- Use a recipient name that does not already exist in gifts.
- Confirm that calculate_budget_status(budget, total) appears after the total calculation inside display_summary.
Help me debug my final budget report.
✔️ Awesome, I've got everything!
Great work. Double check that you saved holiday_gift_manager.py after confirming the $19.75 over-budget status.
ⓧ I'd like to double check the full code
Compare your complete holiday_gift_manager.py file with this finished version:
BUDGET = 150.00
gifts = {
"Alex": {"gift": "Board game", "cost": 32.00},
"Jordan": {"gift": "Scarf", "cost": 24.50},
"Sam": {"gift": "Cookbook", "cost": 38.25},
}
def calculate_total(gift_list):
total = 0
for recipient in gift_list:
total = total + gift_list[recipient]["cost"]
return total
def calculate_budget_status(budget, total):
remaining = budget - total
percentage_used = (total / budget) * 100
return remaining, percentage_used
def display_summary(gift_list, budget):
print("\nHOLIDAY GIFT LIST")
print("-" * 40)
for recipient, details in gift_list.items():
print(f"{recipient}: {details['gift']} - ${details['cost']:.2f}")
total = calculate_total(gift_list)
remaining, percentage_used = calculate_budget_status(budget, total)
print("-" * 40)
print(f"Budget: ${budget:.2f}")
print(f"Total spent: ${total:.2f}")
print(f"Budget used: {percentage_used:.1f}%")
if remaining < 0:
print(f"Status: Over budget by ${0 - remaining:.2f}")
else:
print(f"Status: ${remaining:.2f} remaining")
def add_gift(gift_list):
print("\nADD A GIFT")
recipient = input("Recipient name: ")
if recipient in gift_list:
print(f"{recipient} already has a gift. No changes were made.")
return
gift_name = input("Gift name: ")
cost = float(input("Gift price: $"))
gift_list[recipient] = {"gift": gift_name, "cost": cost}
print(f"Added {gift_name} for {recipient}.")
print("BEFORE ADDING A GIFT")
display_summary(gifts, BUDGET)
add_gift(gifts)
print("\nUPDATED PLAN")
display_summary(gifts, BUDGET)
Secret mission
Update an Existing Gift
Duplicate protection keeps your original gifts safe. Plans can still change. Add a dedicated update workflow that changes one existing recipient before recalculating the budget.
Clean Up Your Resources
Clean Up Your Resources
Choose how you want to leave your local project. It has no ongoing cost.
Resources you used:
- The holiday-gift-manager folder containing holiday_gift_manager.py.
Keep everything running
No action is needed. Choose this option if you want to keep practising with the gift manager.
- Leave the holiday-gift-manager folder in its current location.
- Keep Python installed for future practice.
- Return to the workspace whenever you want another practice session.
Pause - I'll come back to this later
Close your current tools to end the session. The project folder stays ready for your next practice session.
- Close the terminal panel in Visual Studio Code.
- Quit Visual Studio Code.
Delete - I don't want to use this again
Remove the project folder if you want to start fresh. This affects only holiday-gift-manager, so Python and your other files stay in place.
- Close the terminal panel in Visual Studio Code.
- Quit Visual Studio Code.
- In Finder, return to the location where you created holiday-gift-manager.
- Control-click the holiday-gift-manager folder.
- Select Move to Trash from the shortcut menu.
- Confirm that holiday-gift-manager no longer appears in its original Finder location.
Nice Work!
Nice Work!
You did it! You built a terminal-based holiday gift manager with Python that turns a shopping list into a clear budget report.
You've learned how to:
- Built a command-line gift manager that collects recipient details through terminal prompts.
- Organized recipients with nested dictionaries. Protected existing entries with duplicate-key checks.
- Created reusable functions for budget arithmetic. Formatted the results as currency, percentages, or an over-budget warning.
- Added a dedicated update workflow through the Secret Mission. The new function safely replaces one existing gift before the final summary recalculates the budget.
Ready to quiz yourself?