Permalink
Cannot retrieve contributors at this time
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?
GroupD3/placeInit.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
16 lines (12 sloc)
684 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Made by Andris Jansons | |
from FoodFinder import findFood | |
from placeFinderFinal import findPlace | |
def placeInit(sentence, lastSentence): | |
"""Initialize place finder""" | |
food = findFood(lastSentence) #For example: food = the best burger | |
# food can also be: hotel, bank etc. It's just easier to imagine talking about food | |
placeName, placeAddress, placeWebsite, placePhone = findPlace(sentence, food) # We get a tuple back | |
if not(placeName == None): | |
return "You can get "+food+" at "+placeName+"\nLocation: "+placeAddress | |
else: #What happens when there is an error in Google Place API | |
return "I don't know where that is" |