{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Lab 8 \n", "\n", "A simple chatbot\n", "\n", "**1.** Create a function that asks the user his name and says Hello, John Doe\n", "\n", "**2.** Create a function called chat that ask the user what is his problem and will answer \"yes of course\"\n", "\n", "**3.** Create a function called chat that ask the user what is his problem and will answer randomly among 6 possible answers\n", "\n", "**4.** Put all together and improve\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**1.** Create a function that ask the user his name and says Hello, John Doe" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "computer: Hi! What is your name?\n", "user: \n", "computer: Hi! What is your name?\n", "user: \n", "computer: Hi! What is your name?\n", "user: oo\n", "Computer: Hello, oo! \n" ] } ], "source": [ "# Create a function that ask the user his name and says Hello, John Doe\n", "\n", "\n", " \n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**2.** Create a function called chat that ask the user what is his problem and will answer \"yes of course\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Create a function called chat that ask the user what is his problem and will answer \"yes of course\"\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**3.** Create a function called chat that ask the user what is his problem and will answer randomly among 6 possible answers" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Create a function called chat that ask the user what is his problem and will answer randomly among 6 possible answers\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**4.** Put all together and improve" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.0" } }, "nbformat": 4, "nbformat_minor": 2 }