aboutsummaryrefslogtreecommitdiffstats
path: root/DataBase/TimeTable
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2022-05-08 18:01:56 +0530
committerLibravatarLibravatar Biswakalyan Bhuyan <biswa@surgot.in> 2022-05-08 18:01:56 +0530
commitbea4f19f1f36a4bf010dacadc10b16c509097e0f (patch)
tree31e95a1eed42c1922babfb19da5a464d50ce85ae /DataBase/TimeTable
parent591385e00749ffffc72c241594e884d4338e17f4 (diff)
downloadzara-bea4f19f1f36a4bf010dacadc10b16c509097e0f.tar.gz
zara-bea4f19f1f36a4bf010dacadc10b16c509097e0f.tar.bz2
zara-bea4f19f1f36a4bf010dacadc10b16c509097e0f.zip
Artificial Intelligence
Diffstat (limited to 'DataBase/TimeTable')
-rw-r--r--DataBase/TimeTable/TimeTable.py88
1 files changed, 88 insertions, 0 deletions
diff --git a/DataBase/TimeTable/TimeTable.py b/DataBase/TimeTable/TimeTable.py
new file mode 100644
index 0000000..ee1e805
--- /dev/null
+++ b/DataBase/TimeTable/TimeTable.py
@@ -0,0 +1,88 @@
+from datetime import datetime
+import pyttsx3
+
+engine = pyttsx3.init('sapi5')
+voices = engine.getProperty('voices')
+engine.setProperty('voices',voices[2].id)
+
+def Speak(audio):
+ print(" ")
+ print(f": {audio}")
+ engine.say(audio)
+ engine.runAndWait()
+ print(" ")
+
+FiveTo6 = '''
+In This Time ,
+You Have To Get Up & Listen Somethintg Positive .
+5:00 Am To 6:00 Am
+Thanks.
+'''
+
+SixTo9 = '''
+In This Time ,
+You Have To Study .
+6:00 Am To 9:00 Am .
+Thanks .
+'''
+
+NineTo12 = '''
+In This Time ,
+You Have A Make A Video & Have To Upload It On YouTube .
+9:00 Am To 12:00 Pm .
+Thanks .
+'''
+
+TwelveTo15 = '''
+In This Time ,
+You Have To Gain Some Knowledge From The Internet OR From Your Books .
+12:00 Pm To 3:00 Pm .
+Thanks .
+'''
+
+FifteenTo21 = '''
+In This Time ,
+You Have To Code .
+3:00 Pm To 9:00 Pm .
+Thanks .
+'''
+
+TwentyOneTo22 = '''
+In This Time ,
+You Have To Sleep .
+9:00 Pm To 10:00 Pm .
+Thanks .
+'''
+
+def Time():
+
+ hour = int(datetime.now().strftime("%H"))
+
+ if hour>=5 and hour<6:
+ Speak(FiveTo6)
+ return FiveTo6
+
+ elif hour>=6 and hour<9:
+ Speak(SixTo9)
+ return SixTo9
+
+ elif hour>=9 and hour<12:
+ Speak(NineTo12)
+ return NineTo12
+
+ elif hour>=12 and hour<15:
+ Speak(TwelveTo15)
+ return TwelveTo15
+
+ elif hour>=15 and hour<21:
+ Speak(FifteenTo21)
+ return FifteenTo21
+
+ elif hour>=21 and hour<22:
+ Speak(TwentyOneTo22)
+ return TwentyOneTo22
+
+ else:
+ Speak("In This Time , You Have To Sleep ")
+
+ return '''In This Time , You Have To Sleep .'''