0

I got this script

import os

shutdown = input("Do you wish to shutdown your computer ? (yes / no): ")
if shutdown == 'no':
  exit()
else:
  os.system("shutdown /s /t 1")

and when I run it and enter yes it says "shutdown: NOT super-user"

1

1 Answer 1

0
  os.system("sudo shutdown /s /t 1")

Enter sudo

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.