COMPUTER SCIENCE LEVEL 6
ARTIFICIAL INTELLIGENCE WITH PYTHON PROGRAMMING
UNIT CODE: DICS 1215
PRACTICALS
Date……………………………………
RESOURCES:
Computer with Python installed (preferably Anaconda), Jupyter Notebook or any Python IDE,
internet access (if allowed), observe laboratory rules.
Task 1: Create a Simple AI Chatbot
You are required to implement a rule-based chatbot using Python:
a) Define a function respond() that takes user input and replies based on basic greetings.
b) Handle at least three greetings like "hello", "how are you", and "bye".
c) Add a fallback response for unrecognized inputs.
d) Run a loop to allow the user to interact until they type "bye".
e) Test your chatbot with different user inputs.
, Task 2: Perform a Decision-Making Program Using if-else
Create a simple Python program that makes decisions based on user input: