答:import time def startup(): print("正在开机") time.sleep(2) print("开机完成") def shutdown(): print("正在关机") time.sleep(2) print("关机完成") while True: current_time = time.localtime() if current_time.tm_hour == 8 and current_time.tm_min == 0: startup() eli
写一个能控制按时电脑开关机的代码
![](https://img-home.csdnimg.cn/images/20240711042549.png)