Shutdown / restart computer

import os

choice = int(input("Press 1 to shut down the computer or 2 to restart it: "))

if (choice == 1):
    print("System shutdown after 10 seconds.")
    os.system("shutdown /s /t 10")
elif (choice == 2):
    print("System restart after 10 seconds.")
    os.system("shutdown /r /t 10")
else:
    print("Incorrect input")
Output
Press 1 to shut down the computer or 2 to restart it: 1
System shutdown after 10 seconds.