用户:
楊輄_FixedStar查看:62 回复:1 评论:3 创建时间:2024-07-21T21:26:57
代码相比较1.0更加精简!但是上次的bug还没有修复,没有解决方法。希望大佬指点! defwelcome(): print("YangGuangDOSv2.0") welcome() defhelp(): tlk=input("ChineseorEnglish?") iftlk=='Chinese': print("======帮助======") print("好的,帮助已切换成中文!") print("System_Info-----系统信息") print("Sc-----进行简单的两数加法计算") print("menu-----系统菜单") print("settings-----系统设置") eliftlk=='English': print("======help======") print("OK,helphasbeenswitchedtoEnglish!") print("System_Info-----SystemInfor喵") print("Sc-----performsasimpletwo-numberadditioncalculation") print("menu-----systemmenu") print("settings-----systemsettings") else: print("======help======") print("Unknownlanguage,automaticallyswitchedtoEnglish.") print("System_Info-----SystemInfor喵") print("Sc-----performsasimpletwo-numberadditioncalculation") print("menu-----systemmenu") print("settings-----systemsettings") defSystem_Info(): print("Thisversionisbeta1.0.0andwillbecontinuouslyupdated.") print("BasedonPython,itisessentiallyaparsingoperatingsystem,andiscompletelyopensource!") print("https://space.bilibili.com/1359062377?spm_id_from=333.337.0.0") print("Havefunwithit!") defsetting(): print("1.systemsetting") print("2.passwordsetting") tel=input("Pleaseenteranumbertoselect(1or2):") iftel==1: print("=====setting======") print("None") iftel==2: print("=====passwordsetting=====") print("None") defmath(): a=float(input()) i=input() ifi=='+': b=float(input()) print(a+b) ifi=='-': b=float(input()) print(a-b) ifi=='*': b=float(input()) print(a*b) ifi=='/': b=float(input()) print(a/b) ifi=='**': b=float(input()) print(a**b) ifi=='%': b=float(input()) print(a%b) ifi=='//': b=float(input()) print(a//b) tll='0' defmenu(): print("1.off") tll=input("Pleaseenteranumbertoselect:") iftll=='1': print("Goodbye!") exit() iftll=='2': print("Youcanuse'*help'toviewthehelp.") print("Thisversionisbeta1.0.0andwillbecontinuouslyupdated.") print("BasedonPython,itisessentiallyaparsingoperatingsystem,andiscompletelyopensource!") print("https://space.bilibili.com/1359062377?spm_id_from=333.337.0.0") print("Havefunwithit!") defwrite(): file_path="C:/Users/yangy/Desktop/write.txt" file=open(file_path,'w') print("Pleasewrite.") words=input("") file.write(words) file.close() name=input("用户名:") print("欢迎你!",name,"!") print("welcometosunbeamOS!") defSyntaxError_(): print("!!!Thisisnotanexecutablesyntax,pleasetryagain!!!") deftalk_(): talk=input() iftalk=='*help': help() iftalk=='System_Info': System_Info() iftalk=='math': math() iftalk=='setting': setting() iftalk=='off': menu() iftalk=='write': write() whileTrue: talk_()
明_孩子,Dos不能进行任何计算操作。我建议你还是去msdn.cn下载喵的ms-dos6.22用个半年吧,不然我实在看不下去。没有用过dos就来乱说那个是dos,命令提示符都不算是dos。现在市面上都没有几个人能随便编一个dos出来(除了2008年那一阵子的开放源码运动有几十个人编了一个freedos)。
点赞0
评论
Dos是纯英文的,没有任何中文。也没有用户登录界面,也没有设置和窗口。你如果想看Dos仿制版,你可以win+R弹出运行,输入cmd,这个就非常类似于dos,但不是Dos。纯纯的一面黑白屏幕,不会弹出任何交互窗口,不能计算,而且不会有任何中文(Cmd有中文是因为它是仿制版,你安装的系统是中文版)。直接输入程序的名字就会运行这个程序,输入Ver不会弹出窗口,他只会反馈给你一个版本号。
大哥,模拟啊,我没说是真dos啊
我只是在原先的基础上加上一点你看起来不合理的东西,如果你硬是要较真的话我也没办法啊