Skip to content

Commit

Permalink
made some minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ddhruv-IOT authored Jul 15, 2021
1 parent b6e63df commit 7887834
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions iiec.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,25 @@
import os
import datetime
import webbrowser

print("************ASSISTANT************")
pyttsx3.speak("Hello this is Jarvis your assistant")
pyttsx3.speak("Please enter your name To let us serve you better ")
pyttsx3.speak("Please enter your name to let us serve you better ")

name = input("Your Name please: ")

print("If you are new to this app then type man or help")

hour = int(datetime.datetime.now().hour)

if hour >= 0 and hour < 12:
greetings = "Good Morning"+ name + ",How may I help you ? "
greetings = "Good Morning " + name + " ,How may I help you ? "

elif hour >= 12 and hour < 18:
greetings = "Good Afternoon"+ name + ",How may I help you ? "
greetings = "Good Afternoon " + name + " ,How may I help you ? "

else:
greetings = "Good Evening"+ name + ",How may I help you ? "
greetings = "Good Evening " + name + " ,How may I help you ? "


pyttsx3.speak(greetings)
Expand All @@ -26,7 +29,7 @@

while Assistant_on:
pyttsx3.speak("What can I help you with ?")
command = input("How may I help you? ").lower()
command = input("How may I help you ? ").lower()
print("")

if "open chrome" in command or "run chrome" in command or "chrome" in command:
Expand Down Expand Up @@ -97,4 +100,3 @@
else:
pyttsx3.speak("Sorry, this command is not supported at the moment")


0 comments on commit 7887834

Please sign in to comment.