from tkinter import messagebox
import pyttsx3
engine = pyttsx3.init()
def offf():
engine.say("off")
engine.runAndWait()
os.system("shutdown /s /t 1")
result=messagebox.askquestion("off","آیا میخواهید کامپیوتر خاموش شود ؟؟؟؟")
if result=="yes":
offf()
elif result=="no":
exit