DEV Community

Cover image for Day 3: Unleash QuestBot's Power๐ŸŽฏ
Xion Apex Academy
Xion Apex Academy

Posted on

Day 3: Unleash QuestBot's Power๐ŸŽฏ

The finale is here! Day 2 solution has also been posted.

Today we're turning your QuestBot into a complete AI assistant. Alex is practically buzzing with excitement: "I can't believe I built something that actually works!"

Time to add the intelligence that makes it truly special.

What we're completing today: Task deletion, AI-powered motivational quotes, and a portfolio-ready project that proves you can build with AI.

Time needed: ~60 minutes

XP Reward: 100 XP + Quest Champion badge ๐Ÿ†

End Result: A complete AI assistant you can showcase!

๐ŸŽฏ Mission Overview

By the end of today, your QuestBot will:

  • ๐Ÿ—‘๏ธ Delete completed tasks by number
  • ๐Ÿง  Generate random motivational wisdom
  • โœจ Handle user errors gracefully
  • ๐Ÿ“ Be ready for your portfolio
  • ๐ŸŽ‰ Prove you can build real AI projects!

๐Ÿ“ Download Day 3 Files

Today's final toolkit:

  • questbot_day3_template.py - Starter with advanced TODO hints
  • questbot_day3_solution.py - Complete final version
  • README_template.md - Portfolio documentation template
  • portfolio_examples.md - How to showcase this project

This is it - your final build day! ๐Ÿ”ฅ


Quest 1: Master Task Control (40 XP - 20 min)

Time to give QuestBot the power to help you stay organized by removing completed tasks!

Step 1: Import AI Intelligence

First, let's add the power of randomness (which is a key part of AI!):

# QuestBot Day 3 - The Complete AI Assistant
import random  # This gives us AI-like randomness

print("๐Ÿค– SYSTEM INITIALIZING...")
print("โœจ QuestBot v3.0 ONLINE - Full AI Powers Activated!")
print("")
Enter fullscreen mode Exit fullscreen mode

Step 2: Create the Wisdom Database

Every good AI needs knowledge to draw from:

# QuestBot's motivational wisdom database
quotes = [
    "Keep slaying, Recruit! ๐Ÿ”ฅ",
    "You're unstoppable! ๐Ÿ’ช",
    "Forge your future! โšก",
    "Every mission brings you closer to mastery! ๐ŸŽฏ",
    "Small steps, giant leaps! ๐Ÿš€",
    "Code today, conquer tomorrow! ๐Ÿ’ป",
    "Your potential is infinite! โญ",
    "Progress over perfection! ๐Ÿ“ˆ"
]
Enter fullscreen mode Exit fullscreen mode

Step 3: Build on Your Foundation

Use your Day 1 & 2 code as the base:

# Greeting system (from Day 1)
name = input("What's your Recruit name? ")
vibe = input("Pick a vibe (epic, chill, heroic): ")
print(f"\\nSalute, {name}! QuestBot is ready in {vibe} mode!")

# Task collection system (from Day 2)
tasks = []
print("\\n๐Ÿ“ Mission Log System ACTIVATED!")
print("Ready to log your missions! Type 'done' when finished.")
print("-" * 50)

while True:
    task = input("Log a mission (or 'done' to finish): ")
    if task.lower() == "done":
        break
    tasks.append(task)
    print(f"โœ… Added: {task}")

# Display current missions
print(f"\\n๐ŸŽฏ {name}'s Epic Mission Log:")
print("=" * 40)
for i, task in enumerate(tasks, 1):
    print(f"Mission {i}: {task}")
print("=" * 40)
Enter fullscreen mode Exit fullscreen mode

Step 4: Add Task Deletion Power

Now for the new feature - task management:

# Task deletion system
if len(tasks) > 0:  # Only offer deletion if there are tasks
    print("\\n๐Ÿ—‘๏ธ  Mission Complete? Let's clean up your log!")
    delete = input("Delete a completed mission? Enter number (or 'no'): ")

    if delete.isdigit():  # Check if they entered a number
        task_num = int(delete)  # Convert to integer
        if 1 <= task_num <= len(tasks):  # Valid range?
            removed = tasks.pop(task_num - 1)  # Remove task (subtract 1 for list index)
            print(f"๐ŸŽ‰ Mission Accomplished! Vanquished: '{removed}'")
        else:
            print("โŒ Invalid mission number. Try again next time!")
    elif delete.lower() != "no":
        print("๐Ÿค” I didn't understand that. Use a number or 'no'.")
Enter fullscreen mode Exit fullscreen mode

๐ŸŽฎ Test Your Task Control:

  1. Add 3-4 tasks
  2. Try deleting task number 2
  3. Try invalid numbers (0, 99, etc.)
  4. Try typing "no"
  5. Watch QuestBot handle everything smoothly!

โœ… Checkpoint: QuestBot can intelligently delete tasks and handle errors


Quest 2: Add AI Wisdom (30 XP - 15 min)

Time to give QuestBot a brain! Every interaction should end with personalized motivation.

Step 1: Display Updated Mission Log

After any deletion, show the updated list:

# Show updated mission log
if len(tasks) > 0:
    print(f"\\n๐Ÿ“‹ Updated Mission Log:")
    print("=" * 30)
    for i, task in enumerate(tasks, 1):
        print(f"Mission {i}: {task}")
    print("=" * 30)
else:
    print("\\n๐ŸŽ‰ Mission Log is clear! Ready for new challenges!")
Enter fullscreen mode Exit fullscreen mode

Step 2: Activate AI Wisdom Mode

Here's where the "AI" really shines:

# AI Wisdom System
print(f"\\n๐ŸŒŸ QuestBot's Daily Wisdom for {name}:")
print("-" * 35)
wisdom = random.choice(quotes)  # AI selects perfect motivation!
print(f"๐Ÿ’ญ '{wisdom}'")
print("-" * 35)
print("\\n๐Ÿš€ Stay focused and keep building your future!")
Enter fullscreen mode Exit fullscreen mode

๐ŸŽฎ Test the AI:

  • Run your program multiple times
  • Each run should show a different motivational quote
  • This randomness makes it feel like real AI interaction!

โœ… Checkpoint: QuestBot provides AI-powered motivation


Quest 3: Portfolio Polish (30 XP - 25 min)

Time to make this project portfolio-ready! Professional developers always document their work.

Step 1: Complete Day 3 Code

Here's your final QuestBot with all features:

# QuestBot Day 3 - The Complete AI Assistant
import random

print("๐Ÿค– SYSTEM INITIALIZING...")
print("โœจ QuestBot v3.0 ONLINE - Full AI Powers Activated!")
print("")

# Motivational wisdom database
quotes = [
    "Keep slaying, Recruit! ๐Ÿ”ฅ",
    "You're unstoppable! ๐Ÿ’ช", 
    "Forge your future! โšก",
    "Every mission brings you closer to mastery! ๐ŸŽฏ",
    "Small steps, giant leaps! ๐Ÿš€",
    "Code today, conquer tomorrow! ๐Ÿ’ป",
    "Your potential is infinite! โญ",
    "Progress over perfection! ๐Ÿ“ˆ"
]

# Greeting system
name = input("What's your Recruit name? ")
vibe = input("Pick a vibe (epic, chill, heroic): ")
print(f"\\nSalute, {name}! QuestBot is ready in {vibe} mode!")

# Task collection
tasks = []
print("\\n๐Ÿ“ Mission Log System ACTIVATED!")
print("Ready to log your missions! Type 'done' when finished.")
print("-" * 50)

while True:
    task = input("Log a mission (or 'done' to finish): ")
    if task.lower() == "done":
        break
    tasks.append(task)
    print(f"โœ… Added: {task}")

# Display mission log
print(f"\\n๐ŸŽฏ {name}'s Epic Mission Log:")
print("=" * 40)
for i, task in enumerate(tasks, 1):
    print(f"Mission {i}: {task}")
print("=" * 40)

# Task deletion
if len(tasks) > 0:
    print("\\n๐Ÿ—‘๏ธ  Mission Complete? Let's clean up your log!")
    delete = input("Delete a completed mission? Enter number (or 'no'): ")

    if delete.isdigit():
        task_num = int(delete)
        if 1 <= task_num <= len(tasks):
            removed = tasks.pop(task_num - 1)
            print(f"๐ŸŽ‰ Mission Accomplished! Vanquished: '{removed}'")

            # Show updated log
            if len(tasks) > 0:
                print(f"\\n๐Ÿ“‹ Updated Mission Log:")
                print("=" * 30)
                for i, task in enumerate(tasks, 1):
                    print(f"Mission {i}: {task}")
                print("=" * 30)
            else:
                print("\\n๐ŸŽ‰ Mission Log is clear! Ready for new challenges!")
        else:
            print("โŒ Invalid mission number. Try again next time!")
    elif delete.lower() != "no":
        print("๐Ÿค” I didn't understand that. Use a number or 'no'.")

# AI Wisdom System
print(f"\\n๐ŸŒŸ QuestBot's Daily Wisdom for {name}:")
print("-" * 35)
wisdom = random.choice(quotes)
print(f"๐Ÿ’ญ '{wisdom}'")
print("-" * 35)
print("\\n๐Ÿš€ Stay focused and keep building your future!")
print("\\n๐Ÿ’ป QuestBot signing off. Great work today, Recruit!")
Enter fullscreen mode Exit fullscreen mode

Step 2: Create Your README

Every professional project needs documentation. Create a README.md file:

# QuestBot - AI Task Assistant

> Built during the 4IR Quest 3-Day Challenge

## ๐Ÿค– What is QuestBot?

QuestBot is a Python-based AI assistant that helps manage your daily tasks with personality and motivation. Built from scratch in 3 days to demonstrate practical AI development skills.

## โœจ Features

- **Personalized Greetings**: Adapts to your chosen vibe (epic, chill, heroic)
- **Task Management**: Add unlimited tasks with smart organization
- **Intelligent Deletion**: Remove completed tasks by number with error handling
- **AI Motivation**: Random inspirational quotes powered by AI selection
- **User-Friendly Interface**: Clean, professional output formatting

## ๐Ÿ› ๏ธ Technologies Used

- Python 3.x
- Random module for AI-like behavior
- Input/output handling
- List data structures
- Control flow (loops, conditionals)

## ๐Ÿš€ Skills Demonstrated

- **Python Programming**: Variables, functions, loops, conditionals
- **Data Manipulation**: List operations, user input validation
- **Error Handling**: Graceful handling of invalid inputs
- **User Experience**: Intuitive interface design
- **Project Documentation**: Professional README creation

## ๐Ÿ’ป How to Run

1. Ensure Python 3.x is installed
2. Download `questbot.py`
3. Run: `python questbot.py`
4. Follow the interactive prompts!

## ๐Ÿ“ˆ Future Enhancements

- Task categories and priorities
- File persistence
- Web interface
- Integration with productivity apps

---

**Built with โค๏ธ during the #4IRQuestSaga**
Enter fullscreen mode Exit fullscreen mode

โœ… Checkpoint: Professional documentation complete


๐Ÿ† Bonus Challenges (10 XP each!)

Ready to level up? Try these advanced features:

Challenge 1: Task Categories

# Add categories when collecting tasks
task = input("Log a mission: ")
category = input("Category (work/personal/learning): ")
tasks.append({"task": task, "category": category})
Enter fullscreen mode Exit fullscreen mode

Challenge 2: Priority Levels

priority = input("Priority (high/medium/low): ")
tasks.append({"task": task, "priority": priority})
Enter fullscreen mode Exit fullscreen mode

Challenge 3: Save to File

import json

# Save tasks to file
with open("tasks.json", "w") as f:
    json.dump(tasks, f)
Enter fullscreen mode Exit fullscreen mode

๐ŸŽฎ Final Testing

Give your complete QuestBot a thorough workout:

  1. Full Flow Test: Greeting โ†’ Add 5 tasks โ†’ Delete 2 tasks โ†’ See motivation
  2. Error Handling: Try invalid deletion numbers, empty inputs
  3. Edge Cases: Start with no tasks, delete all tasks
  4. Randomness: Run multiple times to see different quotes

๐Ÿ“ธ Quest Log: Share Your Victory!

You did it! You built a complete AI assistant from scratch!

Share a video or screenshots of your QuestBot in action on social media with #4IRQuestSaga - show off those task management skills and motivational quotes!

๐ŸŽ–๏ธ Badge Unlocked: Quest Champion

"Completed the full 3-day QuestBot AI Assistant Mission"


๐ŸŽ“ What You've Mastered

Technical Skills Learned:

  • Python Fundamentals: Variables, functions, loops, conditionals
  • Data Structures: Lists and advanced list manipulation
  • User Interaction: Robust input/output handling
  • Error Handling: Validation and graceful error prevention
  • Code Organization: Clean, readable, maintainable structure
  • Random Selection: AI-like behavior through controlled randomness

4IR Skills Developed:

  • Problem Decomposition: Breaking complex tasks into manageable steps
  • Iterative Development: Building features incrementally over time
  • User Experience Design: Creating intuitive, enjoyable interactions
  • Documentation: Writing clear project descriptions and guides
  • Portfolio Building: Showcasing technical projects professionally

๐Ÿš€ Your Next Steps

Immediate Actions:

  1. ๐Ÿ“ Add to Portfolio: Upload to GitHub, showcase on LinkedIn
  2. ๐ŸŽ‰ Share Achievement: Post your success story with #4IRQuestSaga
  3. ๐Ÿ—ฃ๏ธ Get Feedback: Share with friends, family, developer communities
  4. ๐Ÿ’ผ Update Resume: Add "Python AI Development" to your skills

Continue Your Journey:

  • ๐Ÿ”ฅ Try Advanced Features: File saving, web interfaces, database integration
  • ๐ŸŒŸ Explore Other Quests: Cyber Guardian Kit, Smart Recommendation Engine
  • ๐Ÿ‘ฅ Join Communities: Connect with other developers and AI enthusiasts
  • ๐Ÿ—๏ธ Keep Building: Regular coding practice strengthens your foundation

Career Applications:

  • ๐Ÿ’ช Showcase Skills: Demonstrate Python proficiency and problem-solving
  • ๐Ÿค Network: Connect with other quest participants and developers
  • ๐Ÿ“ˆ Build Momentum: Use this success to tackle bigger challenges
  • ๐ŸŽฏ Stay Consistent: Regular coding practice leads to mastery

๐Ÿ† Achievement Unlocked: Quest Champion!

๐ŸŽ‰ Congratulations, Recruit! You've successfully completed the 3-Day QuestBot Mission!

๐Ÿ“Š Final Stats:

  • Total XP Earned: 300 XP
  • Badges Unlocked: Code Summoner, Task Master, Quest Champion
  • Skills Added: Python Programming, AI Development, Project Management
  • Lines of Code: ~50+ lines of functional Python
  • Features Built: 5+ working features with error handling

๐Ÿ“ Portfolio Statement:
"Developed QuestBot, a Python-based AI task management assistant, in 3 days. Features include personalized user interaction, dynamic task management, motivational quote system, and robust error handling. Demonstrates proficiency in Python fundamentals, user experience design, and iterative development methodology."


๐ŸŒŸ Welcome to the 4IR Revolution!

You're no longer just learning about AI - you're building with AI. You've proven that anyone can create intelligent applications with the right approach and dedication.

Your coding journey has just begun! ๐Ÿš€

Ready for your next mission? Check out advanced challenges and real-world projects at [xionnexus.space]


Total XP Earned Today: 100 XP

Final Total: 300/300 XP โœ…

Progress: MISSION COMPLETE! ๐ŸŽ‰

Questions about your QuestBot? Drop a comment below - let's celebrate your success together! ๐ŸŽŠ

Top comments (0)