how to stop python for some time in python
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 stop python for some time in python
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 stop python for some time in python
now = datetime.datetime.now()
print ("Current date and time : ")
print (now.strftime("%Y-%m-%d %H:%M:%S"))
how to stop python for some time in python
import time
How_long = 5
time.sleep(How_long)
print("Look I got printed after 5 seconds")
how to stop python for some time in python
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 stop python for some time in python
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