Build a Texas Halloween Event Finder

Build a Python CLI that ranks Texas Halloween events by preferences.

Introduction

30 Second Summary

Halloween plans can unravel when event details are scattered across different websites. Age limits and accessibility information are often easy to miss.

In this project, you will build a Python command-line finder for 2026 Halloween events across Texas. The finder ranks verified listings from your preferences while preserving published age guidance and accessibility details.

What You'll Build

Run your finder to see up to three Texas Halloween events ranked for your group with the details needed to check each recommendation.

By the end of this project, you'll have:

  • A working event search that ranks verified listings by region, audience, time, cost, and accessibility needs.
  • Safer age-aware recommendations that keep documented 21+ nightlife away from underage users. Missing organizer guidance stays visible as a reason to check before booking.
  • Verified accessibility filtering that only treats accommodations as confirmed when an organizer or venue publishes relevant details.
  • Secret Mission: Research and add one current local event with a new or underserved demographic tag.

Are there any prerequisites?

No programming experience is required. The project assumes Python 3 and Visual Studio Code are already installed on your Mac.

Before We Start

Responsible recommendations begin with clear boundaries. Before any hands-on work, commit to building a finder that matches people with appropriate events without guessing about age restrictions, costs, or accessibility accommodations.

Set Up the Finder

A setup problem can look like a Python mistake when the editor points at the wrong interpreter. Connecting the editor first keeps that confusion out of your event logic.

You'll connect Visual Studio Code to the installed Python 3 interpreter. A one-line starter file proves that the connection works.

In this step, get ready to:
  • Open texas-halloween-finder as your Visual Studio Code workspace.
  • Prepare Visual Studio Code to use Python 3.
  • Run a starter halloween_finder.py file.
Open the project workspace

Visual Studio Code treats the folder you open as a workspace. Keeping the script in one named folder makes it easy to find as the project grows.

  • Press Command-Space bar on macOS or Windows key + S on Windows to open system search.
  • Type Visual Studio Code into the search field.
  • Select Visual Studio Code from the search results.
  • Click File in the top menu bar.
  • Select Open Folder.
  • Choose your Desktop in the folder picker.
  • Use the folder-creation control to create texas-halloween-finder on your Desktop.
  • Select texas-halloween-finder to open it as your workspace.

You should see texas-halloween-finder at the top of the left sidebar. This confirms that every project file you create next has a clear home.

Connect VS Code to Python

The Python extension from Microsoft gives VS Code language support. The interpreter selection tells it which Python installation runs your file.

  • Select Extensions in the left sidebar.
  • Search for Python.
  • Select the Python extension from Microsoft.
  • Use the extension page's install control if the extension is missing.

Why the extension matters

The extension links Python-aware editing features to Visual Studio Code. Selecting an interpreter gives those features a specific Python installation to use.

  • Open the Command Palette from Visual Studio Code's top menu.
  • Select Python: Select Interpreter.
  • Choose the installed Python 3 interpreter.
  • Open Visual Studio Code's integrated terminal from the top menu.
  • Confirm the available Python version by running this command:
python3 --version

What does this command check?

The python3 command asks the selected Python executable to report its version. The result confirms that your terminal can reach Python before you run the project file.

You should see output that begins with Python 3. This confirms that Python is available inside your workspace.

Does the version check look wrong?

A missing or unexpected version usually means the terminal is using a different Python installation.

  • Return to the Command Palette.
  • Run Python: Select Interpreter again.
  • Choose an interpreter labeled Python 3.
  • Reopen the integrated terminal before repeating the check.
  • Help me diagnose my Python interpreter setup.
Prove the starter file runs

A tiny starter script gives you a clean setup test before recommendation logic enters the project. Its output proves that Visual Studio Code can save the file and run it with Python.

  • Use the new-file control in Visual Studio Code's left sidebar to create halloween_finder.py inside texas-halloween-finder.
  • Enter the project title in halloween_finder.py by copying the code below:
print("Texas Halloween Event Finder")

What does this code do?

The print statement sends the project title to the terminal. Seeing that exact title confirms that Python executed the file you created.

  • Save halloween_finder.py from Visual Studio Code's File menu.

Before you run the file, consider what title you expect the terminal to print.

  • Click Run Python File at the top right of the editor while halloween_finder.py is active.

The integrated terminal should print Texas Halloween Event Finder. That output proves your editor can run the starter file through Python.

Don't see the project title?

  • Confirm that halloween_finder.py is the active editor tab.
  • Save halloween_finder.py before trying Run Python File again.
  • Check that the line contains matching quotation marks and parentheses.
  • Help me debug why my starter Python file does not print the project title.

✔️ Awesome, I've got everything!

Your saved halloween_finder.py file runs through Run Python File and prints the project title.

ⓧ I'd like to double check the full code

Compare your complete halloween_finder.py file with this version:

print("Texas Halloween Event Finder")

What should match?

Your file contains one print statement with the project title inside matching quotation marks.

Your workspace is ready to run Python files. Next, you'll turn this starter into a region-based Texas event recommendation.

Build a Region-Only Recommendation

Your starter file already runs in Visual Studio Code. It prints the finder title through the selected Python interpreter.

A recommendation tool needs a clear starting rule before it can make layered decisions. This first version uses location as its single rule.

In this step, get ready to:
  • Collect one Texas region from user input.
  • Map five regions to sample events with conditional logic.
  • Test whether the same region adapts to different visitors.
Ask for a Texas region

Python's input() pauses the script until the visitor enters a response. The methods after it prepare that response for reliable comparisons.

  • In the halloween_finder.py tab from earlier, place your cursor on the blank line below print("Texas Halloween Event Finder").
  • Capture the visitor's region by adding this line:
region = input("Texas region (north/central/south/gulf/west): ").strip().lower()

What does this line do?

  • The input() function displays the region question before reading the response.
  • The region variable stores the normalized response.
  • The .strip() method removes spaces from the beginning or end of the response.
  • The .lower() method converts the response to lowercase.
  • Save halloween_finder.py.
  • Click Run Python File.

You'll see Texas region (north/central/south/gulf/west): in the terminal.

  • Type north into the terminal.
  • Press Enter.

The terminal accepts north before returning to a new prompt.

Region prompt missing?

  • Confirm that the region line sits below the title's print() line.
  • Save halloween_finder.py before running it again.
  • Ask for help with the prompt.
Map each region to one event

An if/elif/else chain checks possible regions in order. The first matching branch prints its sample event.

  • In halloween_finder.py, place your cursor on the blank line below the region input.
  • Connect each supported region to an event by adding this chain:
if region == "north":
    print("Try PumpkinFest in Mesquite.")
elif region == "central":
    print("Try Pumpkin Nights Austin.")
elif region == "south":
    print("Try Texas Paranormal Fest in San Antonio.")
elif region == "gulf":
    print("Try Ghost Coast Festival in Galveston.")
elif region == "west":
    print("Try HALLOWEEN BBQ MARKET in El Paso.")
else:
    print("Region not recognized. Please try north, central, south, gulf, or west.")

How does the chain choose an event?

  • Each comparison checks whether region matches one supported value.
  • Each indented print() line belongs to the comparison directly above it.
  • The else branch handles any response outside the five supported regions.
  • Save halloween_finder.py.

Before you run the finder, which event do you expect central to produce?

  • Click Run Python File.
  • Type central into the terminal.
  • Press Enter.

You'll see Try Pumpkin Nights Austin. beneath the region prompt.

Recommendation not matching the region?

  • Check that every elif aligns with the opening if.
  • Confirm that each event's print() line has four spaces of indentation.
  • Ask for help with the branch logic.
Test the one-dimensional result

For the first run, imagine an eight-year-old visiting with family. For the second run, imagine an adult looking for a frightening evening event.

Before you run the finder twice, do you think changing the imagined visitor will affect the result when both visitors enter west?

  • Click Run Python File for the first visitor.
  • Type west into the terminal.
  • Press Enter.
  • Click Run Python File for the second visitor.
  • Type west into the terminal.
  • Press Enter.

Both runs print Try HALLOWEEN BBQ MARKET in El Paso..

Your first working recommendation is live. It changes when the region changes.

What did this test reveal?

  • There is no age question, so children receive the same regional event as adults.
  • There is no audience question, so the result cannot respond to different interests.
  • There is no time or price question, so the result cannot account for scheduling or budget needs.
  • There is no accessibility question, so the result cannot check for published accommodations.

✔️ Awesome, I've got everything!

Your saved halloween_finder.py now asks for a region before printing one matching sample event.

ⓧ I'd like to double check the full code

  • Compare your halloween_finder.py file with this complete version:
print("Texas Halloween Event Finder")

region = input("Texas region (north/central/south/gulf/west): ").strip().lower()

if region == "north":
    print("Try PumpkinFest in Mesquite.")
elif region == "central":
    print("Try Pumpkin Nights Austin.")
elif region == "south":
    print("Try Texas Paranormal Fest in San Antonio.")
elif region == "gulf":
    print("Try Ghost Coast Festival in Galveston.")
elif region == "west":
    print("Try HALLOWEEN BBQ MARKET in El Paso.")
else:
    print("Region not recognized. Please try north, central, south, gulf, or west.")

How is the file structured?

The first line prints the project title. The region line collects a normalized response.

The conditional chain compares that response with five supported regions. The final branch handles an unrecognized response.

Your location-based baseline works across five Texas regions. Next up, your finder starts responding to different audiences and practical preferences.

Match Different Demographics

Your region-only finder now changes its suggestion when the location changes. However, that result cannot distinguish a young family from an arts fan or a horror enthusiast.

A Python list can hold a statewide catalog. Each dictionary keeps one event's details together. A scoring function can then rank events against the user's preferences.

In this step, get ready to:
  • Replace the regional branches with a structured event catalog.
  • Collect validated preferences for audience, time, region, and cost.
  • Score the catalog and collect eligible events.
Replace the regional branches with event data

Structured data separates event facts from recommendation rules. Every event follows the same schema, so the finder can compare matching fields without another long conditional chain.

  • In Visual Studio Code, switch back to halloween_finder.py.
  • Press Cmd+A (macOS) or Ctrl+A (Windows) to select the existing region-only code.
  • Paste the first catalog record over the selected code by using this code:
print("Texas Halloween Event Finder")
print("Find a 2026 event that fits your group, interests, and access needs.\n")

# `events` is the verified statewide catalog. Each event dictionary contains:
# name, city, region, date, audiences, times, cost_type, cost, minimum_age,
# age_note, access_verified, access_note, and source.
events = [
    {
        "name": "PumpkinFest",
        "city": "Mesquite",
        "region": "north",
        "date": "October 17, 2026, noon to 5 p.m.",
        "audiences": ["family", "community", "food"],
        "times": ["day"],
        "cost_type": "free",
        "cost": "Free admission and parking; optional activity wristbands",
        "minimum_age": None,
        "age_note": "The official page invites families; no minimum age is stated.",
        "access_verified": False,
        "access_note": "The official event page does not state accessibility details.",
        "source": "https://www.cityofmesquite.com/315/PumpkinFest",
    },
]

How is an event represented?

  • The name, city, region, and date fields identify the event.
  • The audiences and times lists allow one event to suit several groups or times.
  • The cost fields support free-event filtering without discarding the organizer's full pricing note.
  • The age and accessibility fields preserve safety information for the safeguards you add next.
  • Save halloween_finder.py.
  • Click Run Python File in the top-right corner of the editor.

Your first data-backed version now runs. The terminal prints the finder title plus its new description without a syntax error.

Seeing a syntax error in the catalog?

  • Check that events starts with [ and ends with ].
  • Confirm that the PumpkinFest dictionary starts with { and ends with },.
  • Use help me find the unmatched bracket in my events list if the error remains.

The schema becomes useful when every record uses the same field names. The next record adds a sensory-friendly evening event while preserving that structure.

  • Find the closing ] directly below the PumpkinFest dictionary.
  • Place your cursor on the line before that closing bracket.
  • Add the second verified record by pasting this code:
    {
        "name": "Pumpkins After Hours: A Sensory-Friendly Evening at the Dallas Arboretum",
        "city": "Dallas",
        "region": "north",
        "date": "October 20, 2026, 5:30-8 p.m.",
        "audiences": ["family", "teen", "sensory", "community"],
        "times": ["evening"],
        "cost_type": "check",
        "cost": "Check the organizer for admission details",
        "minimum_age": 0,
        "age_note": "The organizer describes activities for all ages.",
        "access_verified": True,
        "access_note": "Sensory-friendly event with smaller crowds and quiet zones.",
        "source": "https://www.dallasarboretum.org/event/pumpkins-after-hours-a-sensory-friendly-evening-at-the-dallas-arboretum-2/",
    },
    # The remaining verified statewide records use this same schema.

Why use the same schema?

Matching field names let one scoring function process every event. New records can join the catalog without creating a separate branch for each event.

The second record also shows how audience tags remain separate from official age guidance. This keeps broad recommendations from overriding organizer details.

  • Save halloween_finder.py.
  • Click Run Python File again.

The expanded catalog now loads successfully. You still see the two heading lines because the recommendation logic comes after the data.

Does the second record trigger an error?

  • Confirm that the new dictionary sits inside the events list before its final ].
  • Check that each field has a colon between its key and value.
  • Use help me debug the second dictionary in my events list for a focused review.
Collect and validate user preferences

User input can contain unexpected values. Allowed-value lists give each prompt a safe fallback, which keeps the recommendation process running with broader preferences.

  • Move to the bottom of halloween_finder.py.
  • Add the allowed choices plus region validation by pasting this code:
valid_regions = ["north", "central", "south", "gulf", "west", "any"]
valid_audiences = ["family", "teen", "adult", "sensory", "arts", "music", "horror", "paranormal", "history", "community", "food", "any"]
valid_times = ["day", "evening", "any"]

region = input("Region (north/central/south/gulf/west/any): ").strip().lower()
if region not in valid_regions:
    print("Region not recognized, so the search will cover all Texas regions.")
    region = "any"

How does region validation work?

  • The three valid_ lists define the values that later prompts accept.
  • The region prompt normalizes spaces and capitalization before checking the result.
  • An unrecognized region becomes any, so the search can cover every represented region.
  • Save halloween_finder.py.
  • Click Run Python File.
  • Enter somewhere at the region prompt.

That fallback confirms the region check works. You see a message explaining that the search now covers all represented Texas regions.

Does the region prompt close immediately?

  • Check that the input() line appears below the three allowed-value lists.
  • Confirm that valid_regions uses the same spelling in its definition and validation check.
  • Use help me debug my region input validation if the prompt still fails.

Region narrows the location. Audience preference captures the type of experience the user wants.

  • Add the audience prompt below the region validation by pasting this code:
audience = input("Audience (family/teen/adult/sensory/arts/music/horror/paranormal/history/community/food/any): ").strip().lower()
if audience not in valid_audiences:
    print("Audience not recognized, so all audience types will be considered.")
    audience = "any"

What does the audience fallback protect?

An unfamiliar audience value could prevent every event from matching. The fallback changes that value to any, which keeps all audience types in consideration.

  • Save halloween_finder.py.
  • Click Run Python File.
  • Enter north at the region prompt.
  • Enter dinosaurs at the audience prompt.

The audience guard now catches unsupported interests. You see a message explaining that every audience type remains eligible.

Missing the audience fallback message?

  • Confirm that audience not in valid_audiences includes the word not.
  • Check that the two lines inside the if block have matching indentation.
  • Use help me fix my audience validation if the value still passes through.

Time preference influences ranking. The free-only answer acts as an eligibility filter, so paid events can be excluded when the user requests free options.

  • Add the time and free-event prompts below the audience validation by pasting this code:
time_preference = input("Time (day/evening/any): ").strip().lower()
if time_preference not in valid_times:
    print("Time not recognized, so both daytime and evening events will be considered.")
    time_preference = "any"

free_only = input("Free events only? (yes/no): ").strip().lower()
if free_only not in ["yes", "no"]:
    free_only = "no"

Why do these fallbacks differ?

An unsupported time becomes any, which considers daytime plus evening events. An unsupported free-only answer becomes no, which avoids removing paid events without a clear request.

  • Save halloween_finder.py.
  • Click Run Python File.
  • Enter north at the region prompt.
  • Enter family at the audience prompt.
  • Enter midnight at the time prompt.
  • Enter no at the free-event prompt.

The complete prompt sequence now runs. The invalid time produces a message that broadens the search to daytime plus evening events.

Does the script stop before the free-event prompt?

  • Check that time_preference has the same spelling in the prompt and validation block.
  • Confirm that the free-event prompt starts after the time validation block ends.
  • Use help me debug my time and free-only prompts if the sequence remains incomplete.
Score and collect matching events

A score turns several partial matches into one ranking value. Strong region or audience matches earn more points than time or free-admission bonuses.

  • Add the scoring pipeline below the free-event validation by pasting this code:
def score_event(event):
    score = 0
    if region == "any":
        score += 1
    elif event["region"] == region:
        score += 4
    if audience == "any":
        score += 1
    elif audience in event["audiences"]:
        score += 4
    if time_preference == "any":
        score += 1
    elif time_preference in event["times"]:
        score += 2
    elif "any" in event["times"]:
        score += 1
    if event["cost_type"] == "free":
        score += 1
    return score

eligible_events = []
for event in events:
    if free_only == "yes" and event["cost_type"] != "free":
        continue
    eligible_events.append(event)

eligible_events.sort(key=score_event, reverse=True)
for event in eligible_events:
    print(event["name"])

How does the ranking pipeline work?

  • The score_event(event) function starts each event at zero points.
  • Matching regions plus audiences each add four points because they strongly shape relevance.
  • Matching times add two points. Free admission adds one point.
  • The loop skips non-free events only when free_only equals yes. The remaining events are sorted from highest score to lowest score.
  • Save halloween_finder.py.
  • Click Run Python File.
  • Enter north at the region prompt.
  • Enter family at the audience prompt.
  • Enter day at the time prompt.
  • Enter yes at the free-event prompt.

The free-only filter now produces a visible result. You see PumpkinFest because its record has a free cost type.

Are paid events still appearing?

  • Confirm that the free-only condition compares cost_type with free.
  • Check that continue sits inside the free-only condition.
  • Use help me debug my free-event filter if the filter still includes the wrong records.

Before the final check, which North Texas family event do you expect to rank first for a daytime search?

  • Click Run Python File.
  • Enter north at the region prompt.
  • Enter family at the audience prompt.
  • Enter day at the time prompt.
  • Enter no at the free-event prompt.

You see PumpkinFest first. Its North Texas location, family tag, daytime schedule, and free cost type give it the strongest score.

The sensory-friendly Dallas event follows because it still matches the requested region plus audience. Your finder can now rank the same location differently for different demographics.

✔️ Awesome, I've got everything!

Your demographic-aware finder accepts four preferences and prints eligible events in ranked order. Double check that halloween_finder.py is saved.

ⓧ I'd like to double check the full code

Compare your halloween_finder.py file with this complete version for the step.

print("Texas Halloween Event Finder")
print("Find a 2026 event that fits your group, interests, and access needs.\n")

# `events` is the verified statewide catalog. Each event dictionary contains:
# name, city, region, date, audiences, times, cost_type, cost, minimum_age,
# age_note, access_verified, access_note, and source.
events = [
    {
        "name": "PumpkinFest",
        "city": "Mesquite",
        "region": "north",
        "date": "October 17, 2026, noon to 5 p.m.",
        "audiences": ["family", "community", "food"],
        "times": ["day"],
        "cost_type": "free",
        "cost": "Free admission and parking; optional activity wristbands",
        "minimum_age": None,
        "age_note": "The official page invites families; no minimum age is stated.",
        "access_verified": False,
        "access_note": "The official event page does not state accessibility details.",
        "source": "https://www.cityofmesquite.com/315/PumpkinFest",
    },
    {
        "name": "Pumpkins After Hours: A Sensory-Friendly Evening at the Dallas Arboretum",
        "city": "Dallas",
        "region": "north",
        "date": "October 20, 2026, 5:30-8 p.m.",
        "audiences": ["family", "teen", "sensory", "community"],
        "times": ["evening"],
        "cost_type": "check",
        "cost": "Check the organizer for admission details",
        "minimum_age": 0,
        "age_note": "The organizer describes activities for all ages.",
        "access_verified": True,
        "access_note": "Sensory-friendly event with smaller crowds and quiet zones.",
        "source": "https://www.dallasarboretum.org/event/pumpkins-after-hours-a-sensory-friendly-evening-at-the-dallas-arboretum-2/",
    },
    # The remaining verified statewide records use this same schema.
]

valid_regions = ["north", "central", "south", "gulf", "west", "any"]
valid_audiences = ["family", "teen", "adult", "sensory", "arts", "music", "horror", "paranormal", "history", "community", "food", "any"]
valid_times = ["day", "evening", "any"]

region = input("Region (north/central/south/gulf/west/any): ").strip().lower()
if region not in valid_regions:
    print("Region not recognized, so the search will cover all Texas regions.")
    region = "any"

audience = input("Audience (family/teen/adult/sensory/arts/music/horror/paranormal/history/community/food/any): ").strip().lower()
if audience not in valid_audiences:
    print("Audience not recognized, so all audience types will be considered.")
    audience = "any"

time_preference = input("Time (day/evening/any): ").strip().lower()
if time_preference not in valid_times:
    print("Time not recognized, so both daytime and evening events will be considered.")
    time_preference = "any"

free_only = input("Free events only? (yes/no): ").strip().lower()
if free_only not in ["yes", "no"]:
    free_only = "no"


def score_event(event):
    score = 0
    if region == "any":
        score += 1
    elif event["region"] == region:
        score += 4
    if audience == "any":
        score += 1
    elif audience in event["audiences"]:
        score += 4
    if time_preference == "any":
        score += 1
    elif time_preference in event["times"]:
        score += 2
    elif "any" in event["times"]:
        score += 1
    if event["cost_type"] == "free":
        score += 1
    return score

eligible_events = []
for event in events:
    if free_only == "yes" and event["cost_type"] != "free":
        continue
    eligible_events.append(event)

eligible_events.sort(key=score_event, reverse=True)
for event in eligible_events:
    print(event["name"])

You have replaced repetitive regional branches with reusable data plus scoring rules. Next, you will enforce documented age restrictions and require verified accessibility details when the user needs them.

Add Age and Accessibility Safeguards

Your Visual Studio Code workspace now contains a statewide catalog in halloween_finder.py. Your Python logic can rank those events using four preferences.

The current finder can still recommend a 21+ event to a child. It can also include events whose organizers publish no relevant accessibility details.

This step turns the catalog's age guidance into enforced rules. It also treats published accessibility information as evidence that the program can filter.

In this step, get ready to:
  • Enforce each event's documented minimum age.
  • Broaden an invalid adult request for someone under 21.
  • Filter events using verified accessibility information.
Enforce documented age rules

Each event already has a minimum_age field. A value such as 21 creates a clear eligibility boundary.

A value of None preserves missing organizer guidance without inventing an age rule. The accompanying age_note keeps that uncertainty visible.

Before you run the current version, do you think it can protect a 12-year-old from a 21+ recommendation?

  • Click Run Python File in the top-right editor toolbar.
  • Enter west at the region prompt.
  • Enter adult at the audience prompt.
  • Enter evening at the time prompt.
  • Enter no at the free-event prompt.

The program never asks for an age. The Halloween Bar Crawl appears even though its documented minimum age is 21.

This shortfall is intentional

The catalog contains age evidence already. The missing safeguard is logic that compares the youngest attendee with each event's documented minimum.

  • In halloween_finder.py, find the region validation block that ends with region = "any".
  • Paste this age input block directly below the region validation block:
age_text = input("Age of the youngest attendee: ").strip()
if age_text.isdigit():
    age = int(age_text)
else:
    print("No valid age was entered, so age-restricted events will be excluded.")
    age = 0

What does this code do?

  • The age_text variable holds the cleaned response from the age prompt.
  • The .isdigit() check confirms that every character is a digit before conversion.
  • The age variable stores the integer used by later comparisons.
  • The fallback value 0 excludes every event with a documented minimum age when the response is invalid.
  • Save halloween_finder.py.
  • Click Run Python File in the top-right editor toolbar.
  • Enter west at the region prompt.
  • Enter 12 at the new age prompt.
  • Enter adult at the audience prompt.
  • Enter evening at the time prompt.
  • Enter no at the free-event prompt.

The terminal now asks for the youngest attendee's age. The program stores that age without applying it to the event loop yet.

Seeing an invalid age message?

  • Enter age using digits such as 12.
  • Check that .isdigit() includes both parentheses.
  • Check that age = int(age_text) is indented beneath the if line.
  • Help me debug the age input.

The event loop currently begins with the free-event condition. You will place the age condition before it so an ineligible event never reaches eligible_events.

  • In halloween_finder.py, find this existing loop line:
for event in events:

What are you looking for?

This line starts the loop that considers every event dictionary. The indented conditions beneath it decide which records reach the eligible list.

  • Add this condition immediately below for event in events::
    if event["minimum_age"] is not None and age < event["minimum_age"]:
        continue

How does the age filter work?

The first comparison confirms that the organizer published a minimum age. The second comparison checks whether the youngest attendee falls below it.

The continue statement skips that event immediately. Records with None keep their uncertainty in age_note.

Before you test the filter, do you expect the 21+ bar crawl to survive a search for a 12-year-old?

  • Save halloween_finder.py.
  • Click Run Python File in the top-right editor toolbar.
  • Enter west at the region prompt.
  • Enter 12 at the age prompt.
  • Enter adult at the audience prompt.
  • Enter evening at the time prompt.
  • Enter no at the free-event prompt.

The Halloween Bar Crawl no longer appears in the event names. Your first safeguard now enforces its documented minimum age.

Still seeing the bar crawl?

  • Check that the age condition is indented inside for event in events:.
  • Check that continue is indented inside the age condition.
  • Confirm that your test age is below the event's minimum_age value of 21.
  • Help me fix the age filter.
Require verified accessibility information

The access_verified field is true only when an official event or venue page publishes relevant accommodations. A terrain warning remains useful in access_note, while it does not count as verified support.

When a user requires verified information, the finder should keep only records with supporting organizer or venue evidence. This prevents missing guidance from becoming an access claim.

  • In halloween_finder.py, find the free-event validation block that ends with free_only = "no".
  • Paste this accessibility input block directly below the free-event validation block:
access_needed = input("Require verified accessibility information? (yes/no): ").strip().lower()
if access_needed not in ["yes", "no"]:
    access_needed = "no"

What does this input control?

The access_needed variable stores a normalized yes or no response. An unrecognized response falls back to no.

  • Save halloween_finder.py.
  • Click Run Python File in the top-right editor toolbar.
  • Complete the existing prompts with any valid values.
  • Enter yes at the new accessibility prompt.

The terminal now asks whether verified accessibility information is required. The answer is ready for the filtering loop.

  • In the event loop, find this existing free-event condition:
    if free_only == "yes" and event["cost_type"] != "free":
        continue

Why use this position?

The loop groups its eligibility checks before eligible_events.append(event). An event reaches the list only after it passes every active requirement.

  • Add this accessibility condition directly below the free-event condition:
    if access_needed == "yes" and not event["access_verified"]:
        continue

How does the accessibility filter work?

The condition activates only when the user enters yes. It skips every record whose official source does not publish relevant accommodation information.

Events with verified details remain eligible. Their access_note fields preserve the specific information a user needs.

Before you run this check, which West Texas arts event do you expect to remain eligible for an 8-year-old who requires verified access information?

  • Save halloween_finder.py.
  • Click Run Python File in the top-right editor toolbar.
  • Enter west at the region prompt.
  • Enter 8 at the age prompt.
  • Enter arts at the audience prompt.
  • Enter evening at the time prompt.
  • Enter no at the free-event prompt.
  • Enter yes at the accessibility prompt.

Candlelight: A Haunted Evening of Halloween Classics remains eligible. Its official listing provides an age rule for ages 8 and older plus verified venue accessibility information.

Seeing events without verified access details?

  • Check that the accessibility condition appears before eligible_events.append(event).
  • Check that the condition uses not event["access_verified"].
  • Confirm that you entered yes at the accessibility prompt.
  • Help me debug the accessibility filter.
Handle under-21 adult requests

The age filter removes individual events that are unavailable to the user. The audience choice can still remain adult even when the youngest attendee is under 21.

Changing that request to any broadens the search while the minimum-age filter stays active. The program also explains the adjustment instead of changing it silently.

  • In halloween_finder.py, find the audience validation block that ends with audience = "any".
  • Paste this under-21 branch directly below the audience validation block:
if audience == "adult" and age < 21:
    print("Adult nightlife is not available to anyone under 21. Using 'any' instead.")
    audience = "any"

Why broaden the audience?

The branch catches a specific conflict between the selected audience and the youngest attendee's age. It changes only the audience preference.

The event loop still enforces every documented minimum_age value. Broader recommendations remain age-safe.

  • Save halloween_finder.py.

Before you run the final under-21 check, do you expect the program to keep the adult audience or broaden the search?

  • Click Run Python File in the top-right editor toolbar.
  • Enter west at the region prompt.
  • Enter 12 at the age prompt.
  • Enter adult at the audience prompt.
  • Enter evening at the time prompt.
  • Enter no at the free-event prompt.
  • Enter no at the accessibility prompt.

The terminal explains that adult nightlife is unavailable to anyone under 21. The Halloween Bar Crawl never appears in the eligible event names.

Before the accessibility check, do you expect the age-appropriate candlelight concert to survive both safeguards?

  • Click Run Python File in the top-right editor toolbar.
  • Enter west at the region prompt.
  • Enter 8 at the age prompt.
  • Enter arts at the audience prompt.
  • Enter evening at the time prompt.
  • Enter no at the free-event prompt.
  • Enter yes at the accessibility prompt.

Candlelight: A Haunted Evening of Halloween Classics remains eligible. You have closed the riskiest gap in the finder by enforcing age evidence plus verified access information.

✔️ Awesome, I've got everything!

Your finder now blocks documented age conflicts. It also honors requests for verified accessibility information.

  • Confirm that halloween_finder.py is saved.
  • Confirm that the under-21 run prints the adult-nightlife explanation.
  • Confirm that the accessibility run keeps the candlelight concert eligible.

ⓧ I'd like to double check the full code

Compare the safeguards in halloween_finder.py with this cumulative reference. Your complete 14-event catalog remains above these input and filtering sections.

valid_regions = ["north", "central", "south", "gulf", "west", "any"]
valid_audiences = [
    "family",
    "teen",
    "adult",
    "sensory",
    "arts",
    "music",
    "horror",
    "paranormal",
    "history",
    "community",
    "food",
    "any",
]
valid_times = ["day", "evening", "any"]

region = input("Region (north/central/south/gulf/west/any): ").strip().lower()
if region not in valid_regions:
    print("Region not recognized, so the search will cover all Texas regions.")
    region = "any"

age_text = input("Age of the youngest attendee: ").strip()
if age_text.isdigit():
    age = int(age_text)
else:
    print("No valid age was entered, so age-restricted events will be excluded.")
    age = 0

audience = input(
    "Audience (family/teen/adult/sensory/arts/music/horror/paranormal/"
    "history/community/food/any): "
).strip().lower()
if audience not in valid_audiences:
    print("Audience not recognized, so all audience types will be considered.")
    audience = "any"

if audience == "adult" and age < 21:
    print("Adult nightlife is not available to anyone under 21. Using 'any' instead.")
    audience = "any"

time_preference = input("Time (day/evening/any): ").strip().lower()
if time_preference not in valid_times:
    print("Time not recognized, so both daytime and evening events will be considered.")
    time_preference = "any"

free_only = input("Free events only? (yes/no): ").strip().lower()
if free_only not in ["yes", "no"]:
    free_only = "no"

access_needed = input("Require verified accessibility information? (yes/no): ").strip().lower()
if access_needed not in ["yes", "no"]:
    access_needed = "no"


def score_event(event):
    score = 0

    if region == "any":
        score += 1
    elif event["region"] == region:
        score += 4

    if audience == "any":
        score += 1
    elif audience in event["audiences"]:
        score += 4

    if time_preference == "any":
        score += 1
    elif time_preference in event["times"]:
        score += 2
    elif "any" in event["times"]:
        score += 1

    if event["cost_type"] == "free":
        score += 1

    if access_needed == "yes" and event["access_verified"]:
        score += 2

    return score


eligible_events = []

for event in events:
    if event["minimum_age"] is not None and age < event["minimum_age"]:
        continue

    if free_only == "yes" and event["cost_type"] != "free":
        continue

    if access_needed == "yes" and not event["access_verified"]:
        continue

    eligible_events.append(event)

eligible_events.sort(key=score_event, reverse=True)

This reference shows the complete input, scoring, and eligibility logic for the current step. Keep your existing event-name printing loop directly below the sorting line.

Your finder now refuses documented age conflicts and respects verified-access requests. Next, you will turn the eligible event names into ranked result cards with the evidence users need.

Rank and Explain the Best Matches

The safeguards from the last step now protect each search. Every event in eligible_events has passed the user's age, cost, and accessibility requirements.

A raw list still forces the user to interpret every record. Ranking the matches and printing clear result cards turns that filtered data into a useful decision tool.

In this step, get ready to:
  • Sort eligible events by their match score.
  • Print up to three result cards with planning details.
  • Explain empty searches without weakening the user's safety requirements.
Rank eligible events

The existing score_event(event) function measures how closely each event matches the user's preferences. Sorting by that score places stronger matches at the front of eligible_events.

  • In halloween_finder.py, locate the completed event-filtering loop.
  • Add the ranking code directly below that loop by pasting this block:
eligible_events.sort(key=score_event, reverse=True)

print("\nTop matches")
print("=" * 48)

How does the ranking work?

  • The key argument passes each eligible event to score_event.
  • The value reverse=True places the highest score first.
  • The two print calls create a visible heading for the ranked results.
  • Save halloween_finder.py.
  • Click Run Python File in the top-right corner of the editor.
  • Enter any for the region.
  • Enter 10 for the youngest attendee.
  • Enter arts for the audience.
  • Enter evening for the time.
  • Enter no for free-only filtering.
  • Enter no for required accessibility information.

You'll see the Top matches heading above a divider. This confirms that the filtering loop reaches the new ranking section.

Missing the Top matches heading?

  • Confirm that the sorting line has no indentation. It belongs below the completed for event in events: loop.
  • Check that both heading lines sit directly below eligible_events.sort(key=score_event, reverse=True).
  • Save halloween_finder.py before running it again.
  • Help me fix the ranking section.
Print the best matches

A result card turns each event dictionary into planning information the user can scan. The surrounding branch also gives the empty list a clear response.

  • In halloween_finder.py, find the line print("=" * 48).
  • Add the result branch directly below that line by pasting this block:
if not eligible_events:
    print("No event meets every safety, cost, and accessibility requirement.")
    print("Try turning off free-only or verified-access filtering, but keep the age accurate.")
else:
    shown = 0

    for event in eligible_events:
        print(f"\n{shown + 1}. {event['name']}")
        print(f"   Location: {event['city']} ({event['region'].title()} Texas)")
        print(f"   Date: {event['date']}")
        print(f"   Cost: {event['cost']}")
        print(f"   Audience tags: {', '.join(event['audiences'])}")
        print(f"   Age guidance: {event['age_note']}")
        print(f"   Accessibility: {event['access_note']}")
        print(f"   Official source: {event['source']}")

        shown += 1
        if shown == 3:
            break

What does this output code do?

  • The if not eligible_events branch handles a search where every record was filtered out.
  • The for loop visits eligible events in ranked order.
  • The shown counter numbers each result card.
  • The break statement limits the output to three recommendations.
  • Each card prints the evidence a user needs before following the official source.

Before you run this search, which details do you expect each arts recommendation to show?

  • Save halloween_finder.py.
  • Click Run Python File in the top-right corner of the editor.
  • Enter any for the region.
  • Enter 10 for the youngest attendee.
  • Enter arts for the audience.
  • Enter evening for the time.
  • Enter no for free-only filtering.
  • Enter no for required accessibility information.

You'll see up to three ranked arts matches. Each card shows its city, date, cost, audience tags, age guidance, accessibility note, and official source URL.

Seeing the heading without result cards?

  • Check that else: aligns with if not eligible_events:.
  • Confirm that for event in eligible_events: is indented inside the else branch.
  • Confirm that every result-card print call is indented inside the event loop.
  • Help me fix my result-card loop.
Handle empty searches safely

Strict filters can remove every catalog record. The fallback suggests loosening cost or access preferences while preserving an accurate age.

  • Add the official-source reminder below the completed result branch by pasting this line:
print("\nAlways recheck the official source before traveling or buying tickets.")

Why include this reminder?

Dates and organizer guidance can change after the catalog is written. The reminder sends the user back to the official source before travel or purchase.

Before you test the fallback, do you think requiring both free admission and verified accessibility will leave any eligible event?

  • Save halloween_finder.py.
  • Click Run Python File in the top-right corner of the editor.
  • Enter any for the region.
  • Enter 10 for the youngest attendee.
  • Enter arts for the audience.
  • Enter evening for the time.
  • Enter yes for free-only filtering.
  • Enter yes for required accessibility information.

You'll see No event meets every safety, cost, and accessibility requirement. The next line suggests adjusting a strict filter while keeping the age accurate.

The official-source reminder appears after the fallback. This keeps the same planning safeguard on every search path.

Missing the no-match guidance?

  • Confirm that you entered yes for both strict filters.
  • Check that the two fallback print calls are indented beneath if not eligible_events:.
  • Place the final reminder below the full branch with no indentation.
  • Help me debug the empty-search branch.

For the final check, which arts events do you expect to rank highest when the region can be anywhere in Texas?

  • Click Run Python File in the top-right corner of the editor.
  • Enter any for the region.
  • Enter 10 for the youngest attendee.
  • Enter arts for the audience.
  • Enter evening for the time.
  • Enter no for free-only filtering.
  • Enter no for required accessibility information.

You'll see no more than three ranked events. Every card includes the city, date, cost, audience tags, age guidance, accessibility note, and official source URL.

That's the full finder working. Your program now turns protected event data into ranked recommendations that explain the evidence behind each choice.

✔️ Awesome, I've got everything!

Great. Double check that you've saved halloween_finder.py and can see up to three complete result cards.

ⓧ I'd like to double check the full code

Your completed halloween_finder.py file should match this reference exactly.

print("Texas Halloween Event Finder")
print("Find a 2026 event that fits your group, interests, and access needs.\n")

events = [
    {
        "name": "PumpkinFest",
        "city": "Mesquite",
        "region": "north",
        "date": "October 17, 2026, noon to 5 p.m.",
        "audiences": ["family", "community", "food"],
        "times": ["day"],
        "cost_type": "free",
        "cost": "Free admission and parking; optional activity wristbands",
        "minimum_age": None,
        "age_note": "The official page invites families; no minimum age is stated.",
        "access_verified": False,
        "access_note": "The official event page does not state accessibility details.",
        "source": "https://www.cityofmesquite.com/315/PumpkinFest",
    },
    {
        "name": "Pumpkins After Hours: A Sensory-Friendly Evening at the Dallas Arboretum",
        "city": "Dallas",
        "region": "north",
        "date": "October 20, 2026, 5:30-8 p.m.",
        "audiences": ["family", "teen", "sensory", "community"],
        "times": ["evening"],
        "cost_type": "check",
        "cost": "Check the organizer for admission details",
        "minimum_age": 0,
        "age_note": "The organizer describes activities for all ages.",
        "access_verified": True,
        "access_note": "Sensory-friendly event with smaller crowds and quiet zones.",
        "source": "https://www.dallasarboretum.org/event/pumpkins-after-hours-a-sensory-friendly-evening-at-the-dallas-arboretum-2/",
    },
    {
        "name": "Pumpkin Nights Dallas–Fort Worth",
        "city": "Arlington",
        "region": "north",
        "date": "September 17-October 31, 2026",
        "audiences": ["family", "teen", "arts"],
        "times": ["evening"],
        "cost_type": "paid",
        "cost": "Paid; 2026 pricing varies by date",
        "minimum_age": 0,
        "age_note": "The event is for all ages; children 3 and under are free.",
        "access_verified": False,
        "access_note": "Farm terrain includes grass, dirt, gravel, sand, and inclines; the organizer says wheelchairs have proven difficult.",
        "source": "https://www.pumpkinnights.com/dallas",
    },
    {
        "name": "Avant Chamber Ballet Presents Phillip Glass's Dracula",
        "city": "Dallas",
        "region": "north",
        "date": "October 30-31, 2026",
        "audiences": ["teen", "arts", "music", "horror"],
        "times": ["evening"],
        "cost_type": "paid",
        "cost": "Paid",
        "minimum_age": 10,
        "age_note": "Recommended for audiences ages 10 and up.",
        "access_verified": False,
        "access_note": "The official event listing does not state accessibility details.",
        "source": "https://www.visitdallas.com/events/avant-chamber-ballet-presents-phillip-glasss-dracula/",
    },
    {
        "name": "Junkyard Haunted House at City Park",
        "city": "Dallas",
        "region": "north",
        "date": "Friday, Saturday, and Sunday nights in October 2026",
        "audiences": ["horror", "history"],
        "times": ["evening"],
        "cost_type": "paid",
        "cost": "Paid",
        "minimum_age": None,
        "age_note": "The official listing does not state a minimum age; check before taking children.",
        "access_verified": False,
        "access_note": "The official event listing does not state accessibility details.",
        "source": "https://www.visitdallas.com/events/junkyard-haunted-house-at-city-park/",
    },
    {
        "name": "Pumpkin Nights Austin",
        "city": "Austin",
        "region": "central",
        "date": "September 17-October 31, 2026",
        "audiences": ["family", "teen", "arts"],
        "times": ["evening"],
        "cost_type": "paid",
        "cost": "Paid; 2026 pricing varies by date",
        "minimum_age": 0,
        "age_note": "The event is for all ages; children 3 and under are free.",
        "access_verified": False,
        "access_note": "Farm terrain includes grass, dirt, gravel, sand, and inclines; the organizer says wheelchairs have proven difficult.",
        "source": "https://www.pumpkinnights.com/austin",
    },
    {
        "name": "Freaky Deaky 2026",
        "city": "Austin",
        "region": "central",
        "date": "October 30-31, 2026",
        "audiences": ["music", "horror"],
        "times": ["any"],
        "cost_type": "check",
        "cost": "Check the organizer for ticket details",
        "minimum_age": None,
        "age_note": "The official homepage does not state age guidance; check before booking.",
        "access_verified": False,
        "access_note": "The official homepage does not state accessibility details.",
        "source": "https://freakydeaky.com/",
    },
    {
        "name": "Texas Paranormal Fest",
        "city": "San Antonio",
        "region": "south",
        "date": "September 19, 2026, 3-11 p.m.",
        "audiences": ["family", "teen", "paranormal", "history"],
        "times": ["day", "evening"],
        "cost_type": "paid",
        "cost": "Paid",
        "minimum_age": None,
        "age_note": "The organizer lists youth tickets for ages 4-15 and adult tickets for ages 16+.",
        "access_verified": False,
        "access_note": "The event is primarily outdoors; the page does not publish specific access accommodations.",
        "source": "https://www.curioustwins.com/paranormal-fest",
    },
    {
        "name": "Ghost Coast Festival",
        "city": "Galveston",
        "region": "gulf",
        "date": "October 9-11, 2026",
        "audiences": ["family", "paranormal", "history"],
        "times": ["day", "evening"],
        "cost_type": "paid",
        "cost": "Paid festival passes",
        "minimum_age": None,
        "age_note": "The organizer calls it family friendly and lists kids activities; no minimum age is stated.",
        "access_verified": False,
        "access_note": "The official event page does not state accessibility details.",
        "source": "https://ghostcoastfestival.com/",
    },
    {
        "name": "Boo Bash Festival 2026",
        "city": "Portland",
        "region": "gulf",
        "date": "October 17, 2026, 6-9 p.m.",
        "audiences": ["family", "teen", "community"],
        "times": ["evening"],
        "cost_type": "free",
        "cost": "Free",
        "minimum_age": 0,
        "age_note": "The city describes the festival as being for all ages.",
        "access_verified": False,
        "access_note": "The official city page does not state accessibility details.",
        "source": "https://portlandtx.gov/boobash",
    },
    {
        "name": "HALLOWEEN BBQ MARKET",
        "city": "El Paso",
        "region": "west",
        "date": "October 17, 2026",
        "audiences": ["family", "community", "food"],
        "times": ["day"],
        "cost_type": "free",
        "cost": "Free event",
        "minimum_age": None,
        "age_note": "The listing includes trick-or-treating and a costume contest but does not state a minimum age.",
        "access_verified": False,
        "access_note": "The official event listing does not state accessibility details.",
        "source": "https://visitelpaso.com/events/halloween-bbq-market",
    },
    {
        "name": "Candlelight: A Haunted Evening of Halloween Classics",
        "city": "El Paso",
        "region": "west",
        "date": "October 29, 2026, 8:45-10 p.m.",
        "audiences": ["teen", "arts", "music", "horror"],
        "times": ["evening"],
        "cost_type": "paid",
        "cost": "Paid",
        "minimum_age": 8,
        "age_note": "Ages 8+; anyone under 16 must be accompanied by an adult.",
        "access_verified": True,
        "access_note": "The official listing states that the venue is ADA compliant.",
        "source": "https://visitelpaso.com/events/candlelight-a-haunted-evening-of-halloween-classics-2026-10-29",
    },
    {
        "name": "The Halloween Bar Crawl - El Paso",
        "city": "El Paso",
        "region": "west",
        "date": "October 31, 2026, 4 p.m.-11:55 p.m.",
        "audiences": ["adult", "music"],
        "times": ["evening"],
        "cost_type": "paid",
        "cost": "Paid",
        "minimum_age": 21,
        "age_note": "All attendees must be 21+ with valid government-issued ID.",
        "access_verified": False,
        "access_note": "The official listing does not state accessibility details.",
        "source": "https://visitelpaso.com/events/the-halloween-bar-crawl-el-paso",
    },
    {
        "name": "Spookie Fudge Stripes Safari",
        "city": "Houston",
        "region": "gulf",
        "date": "September 1-October 31, 2026",
        "audiences": ["family", "community"],
        "times": ["day"],
        "cost_type": "included",
        "cost": "Included with regular Houston Zoo admission or membership",
        "minimum_age": None,
        "age_note": "The event page states 18+ only for sweepstakes eligibility, not for taking part in the safari.",
        "access_verified": True,
        "access_note": "Houston Zoo publishes mobility rentals, sensory guides, sensory bags, service-animal guidance, and attendant passes.",
        "source": "https://www.houstonzoo.org/events/spookie-stripes-safari/",
    },
]

valid_regions = ["north", "central", "south", "gulf", "west", "any"]
valid_audiences = [
    "family",
    "teen",
    "adult",
    "sensory",
    "arts",
    "music",
    "horror",
    "paranormal",
    "history",
    "community",
    "food",
    "any",
]
valid_times = ["day", "evening", "any"]

region = input("Region (north/central/south/gulf/west/any): ").strip().lower()
if region not in valid_regions:
    print("Region not recognized, so the search will cover all Texas regions.")
    region = "any"

age_text = input("Age of the youngest attendee: ").strip()
if age_text.isdigit():
    age = int(age_text)
else:
    print("No valid age was entered, so age-restricted events will be excluded.")
    age = 0

audience = input(
    "Audience (family/teen/adult/sensory/arts/music/horror/paranormal/"
    "history/community/food/any): "
).strip().lower()
if audience not in valid_audiences:
    print("Audience not recognized, so all audience types will be considered.")
    audience = "any"

if audience == "adult" and age < 21:
    print("Adult nightlife is not available to anyone under 21. Using 'any' instead.")
    audience = "any"

time_preference = input("Time (day/evening/any): ").strip().lower()
if time_preference not in valid_times:
    print("Time not recognized, so both daytime and evening events will be considered.")
    time_preference = "any"

free_only = input("Free events only? (yes/no): ").strip().lower()
if free_only not in ["yes", "no"]:
    free_only = "no"

access_needed = input("Require verified accessibility information? (yes/no): ").strip().lower()
if access_needed not in ["yes", "no"]:
    access_needed = "no"


def score_event(event):
    score = 0

    if region == "any":
        score += 1
    elif event["region"] == region:
        score += 4

    if audience == "any":
        score += 1
    elif audience in event["audiences"]:
        score += 4

    if time_preference == "any":
        score += 1
    elif time_preference in event["times"]:
        score += 2
    elif "any" in event["times"]:
        score += 1

    if event["cost_type"] == "free":
        score += 1

    if access_needed == "yes" and event["access_verified"]:
        score += 2

    return score


eligible_events = []

for event in events:
    if event["minimum_age"] is not None and age < event["minimum_age"]:
        continue

    if free_only == "yes" and event["cost_type"] != "free":
        continue

    if access_needed == "yes" and not event["access_verified"]:
        continue

    eligible_events.append(event)

eligible_events.sort(key=score_event, reverse=True)

print("\nTop matches")
print("=" * 48)

if not eligible_events:
    print("No event meets every safety, cost, and accessibility requirement.")
    print("Try turning off free-only or verified-access filtering, but keep the age accurate.")
else:
    shown = 0

    for event in eligible_events:
        print(f"\n{shown + 1}. {event['name']}")
        print(f"   Location: {event['city']} ({event['region'].title()} Texas)")
        print(f"   Date: {event['date']}")
        print(f"   Cost: {event['cost']}")
        print(f"   Audience tags: {', '.join(event['audiences'])}")
        print(f"   Age guidance: {event['age_note']}")
        print(f"   Accessibility: {event['access_note']}")
        print(f"   Official source: {event['source']}")

        shown += 1
        if shown == 3:
            break

print("\nAlways recheck the official source before traveling or buying tickets.")

Secret mission

Add One Verified Local Event

Extend the catalog with one current 2026 event from your local area. You will preserve the finder's evidence rules while proving that your new record responds to matching preferences and existing safeguards.

Clean Up Your Resources

Clean Up Your Resources

Everything you built lives locally in the texas-halloween-finder folder on your Mac. There are no cloud resources or paid services, so keeping it creates no ongoing project costs.

Choose whether to keep the finder available, close the workspace for now, or delete the project entirely.

Resources you used:

  • Local Python project folder (texas-halloween-finder), including halloween_finder.py and your additional researched event record.

Keep everything running

No action is needed. This option keeps your completed finder ready for more events or recommendation rules.

  • Keep halloween_finder.py inside the texas-halloween-finder folder.
  • Run the finder again whenever you want to compare another set of preferences.
  • Recheck each official source before using its event details to make plans.

Pause - I'll come back to this later

The finder stops after each run, so there is no background process to shut down. This option keeps your code while closing the editor workspace.

  • Save halloween_finder.py.
  • Close the texas-halloween-finder workspace in Visual Studio Code.
  • Return to the same folder when you are ready to continue adding verified events.

Delete - I don't want to use this again

This option removes the complete local project. Deleting the folder is permanent, but it affects only this finder and its local files.

  • Copy any researched event details you want to keep into another document.
  • In the open Visual Studio Code workspace, open its integrated terminal.
  • Delete the texas-halloween-finder folder and list the remaining parent-folder items by running these commands:
cd ..
rm -rf texas-halloween-finder
ls

What Does This Cleanup Do?

  • The first line moves the terminal from the project folder to its parent folder.
  • The second line permanently removes the complete texas-halloween-finder folder.
  • The final line displays the remaining items so you can verify the deletion.

You should no longer see texas-halloween-finder in the listed items. That clears the only local resource created by this project.

Still See the Project Folder?

Confirm that the terminal started inside texas-halloween-finder before the first line moved to its parent folder. Help me safely check why my project folder was not removed.

Nice Work!

Nice Work!

You did it! You built a working Python command-line finder that ranks verified 2026 Texas Halloween events around a visitor's preferences. Every recommendation keeps its supporting evidence visible.

You've learned how to:

  • Replace repetitive regional branches with a reusable list of dictionaries. Keep event data separate from recommendation rules.
  • Use input validation to handle unexpected answers safely. Apply comparison logic inside loops. Rank suitable events with score_event(event).
  • Enforce age safeguards before displaying results. Require published accommodation details for verified-access searches. Print official sources so visitors can recheck plans.
  • Secret Mission: Researched another 2026 local event. Added a complete record using the existing schema. Confirmed that the new event still follows the age and accessibility filters.

Ready to quiz yourself?