From 23502b2151b51b0a19c556532f4f35cdd6139675 Mon Sep 17 00:00:00 2001 From: Mahil Reshi <97906348+mahilreshi@users.noreply.github.com> Date: Sat, 1 Oct 2022 20:28:46 +0530 Subject: [PATCH] Created mahilreshi.py This is a python code to automate shutdown for windows --- Shutdown_automation/mahilreshi.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Shutdown_automation/mahilreshi.py diff --git a/Shutdown_automation/mahilreshi.py b/Shutdown_automation/mahilreshi.py new file mode 100644 index 000000000..1fe8a3502 --- /dev/null +++ b/Shutdown_automation/mahilreshi.py @@ -0,0 +1,8 @@ +import os + +shutdown = input("Do you wish to shutdown your computer ? (yes / no): ") + +if shutdown == 'no': + exit() +else: + os.system("shutdown /s /t 1")