forked from RKC3000/IIEC-RISE-Specialist-in-Python-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask-1
More file actions
42 lines (30 loc) · 1.34 KB
/
Task-1
File metadata and controls
42 lines (30 loc) · 1.34 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
pyttsx3.speak("Welcome Javis at your service")
print("Welcome Javis at your service")
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)):
pyttsx3.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)):
pyttsx3.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)):
pyttsx3.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)) :
pyttsx3.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)):
pyttsx3.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):
pyttsx3.speak("OK sir")
print("OK sir")
elif ("exit" in p) or ("Exit" in p) or ("quit" in p) or ("Quit" in p):
break
else:
# pyttsx3.speak("Incorrect input")
print("Sorry!! please input correct task :)")