Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#This module was written by Irtiza Safdar
from YELP import *
from Jokes import *
from random import randint
def feeling(userInput):
"""possible inputs and outputs for feelings"""
feelingResponses = {"good" : "great", "amazing" : "very good", "just great" : "just amazing"}
if userInput in feelingResponses:
return ("Good to hear!")
else:
return ("Hope your day gets better." )
def food(userInput):
"""possible inputs and outputs for restaurants"""
foodResponses = {"suggest some good places to eat at" : "I'm going to be heading out with a couple of friends can you suggest some places to eat at?"}
foodList = []
if userInput in foodResponses:
for storeNum in range(5):
foodList.append(yelpSearch("food", storeNum))
return foodList
def joke(userInput):
"""possible inputs and outputs for jokes"""
jokeResponses = {"i'm bored tell me a joke" : "Chibi make me laugh", "Can you tell me a joke pls?" : "Chibi help me kill some time by telling me a joke."}
if userInput in jokeResponses:
return Joke_return()
def news(userInput):
"""possible inputs and outputs for news"""
newsResponses = {"anything good in the news today?" : "what's the latest sports' news", "what's the latest news?" : "what's the popular news stories today?"}
newsList = ["bbc", "times of india", "new york times", "mtv", "lad bible", "buzz feed", "bbc sports", "espn", "sports bible"]
if userInput in newsResponses:
return newsList[randint(0, len(newsList) -1)]
##already have capability to call movies and yelp, so no need for two functions below
##def movies():
## """possible inputs and outputs for movie"""
## moviesResponses = {"Chibi give me a list of some good movies to watch" : "Any good movies on tonight?", "What are the latest movies on demand?" : "Any good movies worth watching?"}
## if movies in moviesResponses:
## print ("Here's some suggestions of good movies") #insertmoviesAPI
##movies()
##
##
##def yelp():
## """possible inputs and outputs for yelp"""
## yelpResponses = {"Chibi can you tell me places nearby to eat ice cream from" : "Hey Chibi any libraries nearby to study at for my exams?"}
## if yelp in yelpResponses:
## print ("insert yelpAPI")
##yelp()