Last active
September 23, 2020 16:34
-
-
Save zakirangwala/67a3cb66680eb185090703ab26ad3120 to your computer and use it in GitHub Desktop.
Tutorial Code : Main Method
This file contains hidden or 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
if __name__ == "__main__": | |
greet() | |
city, country, latitude, longitude = get_location() | |
while True: | |
query = listen().lower() | |
if 'stock' in query: | |
pass | |
elif 'weather' in query or 'temperature' in query: | |
pass | |
elif 'movie' in query or 'documentary' in query: | |
pass | |
elif 'series' in query or 'tv' in query: | |
pass | |
elif 'score' in query: | |
pass | |
elif 'send' in query and 'email' in query: | |
pass | |
elif ('stop' in query and query[query.find('stop') + 4:query.find('stop') + 5] == '') or ('thank you' in query and query[query.find('thank you') + 9:query.find('thank you') + 10] == ''): | |
print('Have a wonderful day!') | |
speak('Have a wonderful day!') | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment