how to use python to sleep if the user is not using the system
import time
print("This is how to pause a program")
time.sleep(5)
print("Did you saw that i slept for 5 seconds")
how to use python to sleep if the user is not using the system
import time
print("This is how to pause a program")
time.sleep(5)
print("Did you saw that i slept for 5 seconds")
how to use python to sleep if the user is not using the system
import time
import requests
from pprint import pprint
try:
Api_key = "Your api key"
city_or_country = str(input('Write a "city" or "Country" name for which you want the weather:- '))
print("Fetching Data of",city_or_country)
time.sleep(4)
URL = "https://api.openweathermap.org./data/2.5/weather?appid=" + Api_key + "&q="+ city_or_country
weather_data = requests.get(URL).json()
pprint(weather_data)
except ValueError:
print("incorrect input or API KEY")
how to use python to sleep if the user is not using the system
import screen_brightness_control as screen
sent_the_brightness = screen.set_brightness(10)
get = screen.get_brightness()
print(get)
how to use python to sleep if the user is not using the system
import mouse
import time
import os
import pyttsx3
while True:
before_sleep = mouse.get_position()
time.sleep(600)
after_sleep = mouse.get_position()
if before_sleep == after_sleep:
pyttsx3.speak("Going to shut down")
os.system("shutdown /s /t 1")
how to use python to sleep if the user is not using the system
import os
os.system("start chrome")
os.system("py")
how to use python to sleep if the user is not using the system
import time
import pyttsx3
def countdown(t):
while t:
mins, seconds = divmod(t, 60)
timer = "{:02d}:{:02d}".format(mins,seconds)
print(timer, end="\r")
time.sleep(1)
t -= 1
pyttsx3.speak("Beep Beep Beep Beep Beep Beep")
pyttsx3.speak("Timer has completed")
print("Timer has done")
timer = int(input("Enter the time in seconds:- "))
print(countdown(timer))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us