1import time
2print("This is how to pause a program")
3time.sleep(5)
4print("Did you saw that i slept for 5 seconds")
1import screen_brightness_control as screen
2sent_the_brightness = screen.set_brightness(10)
3get = screen.get_brightness()
4print(get)
1import time
2How_long = 5
3time.sleep(How_long)
4print("Look I got printed after 5 seconds")
1import mouse
2import time
3import os
4import pyttsx3
5while True:
6 before_sleep = mouse.get_position()
7 time.sleep(600)
8 after_sleep = mouse.get_position()
9 if before_sleep == after_sleep:
10 pyttsx3.speak("Going to shut down")
11 os.system("shutdown /s /t 1")
1import psutil
2import time
3import pyttsx3
4import os
5while True:
6 time.sleep(5)
7 battery = psutil.sensors_battery()
8 print("Battery percentage : ", battery.percent)
9 print("Power plugged in : ", battery.power_plugged)
10 print()
11 if battery.percent < 25 and battery.power_plugged == False:
12 print("Your battey is low on power")
13 pyttsx3.speak("Your battery is low on power")
14 if battery.percent <= 20 and battery.power_plugged == False:
15 pyttsx3.speak("power in fast")
16 time.sleep(5)
17 pyttsx3.speak("Turning my prosegers on")
18 time.sleep(10)
19 if battery.power_plugged == False: os.system("shutdown /s /t 1")
20 elif battery.percent > 95 and battery.power_plugged == True:
21 pyttsx3.speak("Your laptop has charged enough")
22 print("Your laptop has charged enough")