Liam's First Chatbot
Python Snippet ๐
# Liam's first chatbot!
# Built with Python basics ๐
def ask_liam_bot(question):
responses = {
"minecraft": "Dirt house is valid architecture!",
"robots": "Line follower go brrr ๐ค",
"homework": "Working on an agent for that...",
}
for key in responses:
if key in question.lower():
return responses[key]
return "Ask Dad, he knows everything."
# Test it!
print(ask_liam_bot("Tell me about robots"))
# Output: Line follower go brrr ๐ค
๐ก Curt says: The condition logic is clean, the variable naming is great, and the comments are already better than half the code I read on the job. Kid's going places.