猫史档案馆


【Python作品分享】pyPC操作系统

用户:阿兹卡班在逃囚徒阿兹卡班在逃囚徒查看:0 回复:0 评论:0 创建时间:2021-11-02T20:42:44


【作品展示】

center_image

 

【作品介绍】

欢迎使用pyPC操作系统

这是一个完全免费的版本

可能还不是很尽如人意

但是这玩意还是很OK的

 

【作品源代码】

start_cmd = input("输入系统指令:")
py_cmd = input("输入命令提示符代码:")
turtle_cmd = input("画出你要画的图形(circle,square,triangle):")

print(start_cmd)
if start_cmd == "shutdown":
    pass
elif start_cmd == "help":
    print("shutdown 关机;command 命令提示符;winver 查看版本")
elif start_cmd == "winver":
    print("pyPC 1.0,内部版本:Alpha 3.0.1,产品使用权属于:MC_xianyu,Users")
elif start_cmd == "command":
    print(py_cmd)
    if py_cmd == "turtle":
        import turtle
        pen = turtle.Pen()
        print("海龟库载入完成!")
        print(turtle_cmd)
        if turtle_cmd == "circle":
            pen.circle(60)
            turtle.done()
        elif turtle_cmd == "square":
            for i in range(4):
                pen.forward(100)
                pen.right(90)
            turtle.done()
        elif turtle_cmd == "triangle":
            for i in range(3):
                pen.forward(100)
                pen.right(60)
            turtle.done()
        elif turtle_cmd == "help":
            print("circle 圆;square 正方形;triangle 三角形")
        else:
            print("未知指令,输入help以获取帮助")
    elif py_cmd == "bug":
        for i in range(99):
            print("SystemError:System is invaded by virus!")
    else:
            print("未知指令,请输入help以获取帮助")
else:
    print("未知指令,请输入help以获取帮助")

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 0下一页