-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTask-1
More file actions
42 lines (30 loc) · 1.38 KB
/
Task-1
File metadata and controls
42 lines (30 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os
import pyttsx3 as p
p.speak("Welcome Javis at your service, I am a personal Assistant of Ramakrishna")
print("Welcome Javis at your service, I am a personal Assistant of Ramakrishna")
while True:
print("What is my task : " , end='')
p = input()
if ("don't" in p) or ("dont" in p) or ("do not" in p) or ("no need to" in p) and (("chrome" in p) or ("browser" in p)):
p.speak("OK sir")
print("OK sir")
elif (("run" in p) or ("execute" in p) or ("open" in p )) and (("chrome" in p) or ("browser" in p)):
p.speak("Opening chrome browser")
os.system("start chrome")
elif ("don't" in p) or ("dont" in p) or ("do not" in p) or ("no need to" in p) and (("notepad" in p) or ("editor" in p)):
p.speak("OK sir")
print("OK sir")
elif (("run" in p) or ("execute" in p ) or ("open" in p )) and (("notepad" in p) or ("editor" in p)) :
p.speak("Opening notepad")
os.system("notepad")
elif (("run" in p) or ("execute" in p ) or ("open" in p )) and (("player" in p) or ("media" in p)):
p.speak("Opening VLC media player")
os.system("VLC media player")
elif ("don't" in p) or ("dont" in p) or ("do not" in p) or ("no need to" in p) and ("player" in p) or ("media" in p):
p.speak("OK sir")
print("OK sir")
elif ("exit" in p) or ("Exit" in p) or ("quit" in p) or ("Quit" in p):
break
else:
# p.speak("Incorrect input")
print("Sorry!! please input correct task :)")