用户:
好动的流星猫57查看:0 回复:1 评论:0 创建时间:2020-10-03T15:23:23
【作品展示】

【作品介绍】
命令集:Game 玩游戏
dir 查看列目录
ver 查看目前版本
……剩下的太多了,你们自己去源代码里探索吧!
【作品源代码】
import random
aaa111 = 'QWERTYUIOPASDFGHJKLUIO'
BBB110 = 'UIO'
heng1 = 0
print('david computer lnc.©2020')
密码 = input('请创建密码:')
密码_1 = input('请输入密码:')
if (密码_1 == 密码):
print('密码正确!')
else:
while True:
print('')
while True:
Input = input(']')
if (Input == 'dxcel'):
d = input()
x = input()
c = input()
e = input()
l = input()
d1 = input()
x1 = input()
c1 = input()
e1 = input()
l1 = input()
d2 = input()
x2 = input()
c2 = input()
e2 = input()
l2 = input()
print(d, ' ', x, ' ', c, ' ', e, ' ', l)
print(d1, ' ', x1, ' ', c1, ' ', e1, ' ', l1)
print(d2, ' ', x2, ' ', c2, ' ', e2, ' ', l2)
elif (Input == 'dord'):
dord = input()
elif (Input == 'find'):
print(aaa111)
for i in range(len(aaa111)):
if (aaa111[i:i + 3] == BBB110):
heng1 = (heng1 + 1)
print('找到了!', BBB110, '在', aaa111, '的', i, '到', (i + 3))
print(BBB110, '在', aaa111, '出现的次数为', heng1, '次')
elif (Input == 'Game'):
num = random.randint(0, 100)
guess = int(input('请猜一个1到100之间的秘密数字(包括1和100): '))
while (guess != num):
if (guess > num):
print(guess, '猜大了,请再来一次!')
if (guess < num):
print(guess, '猜小了,请再来一次!')
guess = int(input('再来一次:'))
print(guess, '就是秘密数字!恭喜你猜对了!')
elif (Input == 'dir'):
print('ABC.TXT')
print('JavaScript.run')
print('windows 1.0.run')
print('c++.run')
print('kitten.run')
print('Lotus 123.run')
print('TV.TXT')
print('car.TXT')
print('abc.song')
print('judge.run')
print('IIgs.start')
print('DOS.start')
print('system.disk')
print('students.docx')
print('students(1).xlsx')
print('chengfabiao.docx')
print('kejiancao.wmv')
print('U3L2.swf')
print('clac.run')
print('word.run')
print('excel.run')
print('powerpoint.run')
elif (Input == 'ver'):
print('DavidDesktop 2.03')
elif (Input == 'exit'):
break
elif (Input == 'result'):
c = int(input('请输入你的成绩:'))
if (c > 60):
print('及格')
elif (c < 60):
print('不及格')
else:
pass
elif (Input == 'Eleua'):
a = int(input('请输入你的电脑的电量:'))
if (a > 50):
print('无需充电')
elif (a < 50):
print('得充电啦!')
else:
pass
elif (Input == 'Mulclac'):
print('1*1=1')
print('1*2=2 2*2=4')
print('1*3=3 2*3=6 3*3=9')
print('1*4=4 2*4=8 3*4=12 4*4=16')
print('1*5=5 2*5=10 3*5=15 4*5=20 5*5=25')
print('1*6=6 2*6=12 3*6=18 4*6=24 5*6=30 6*6=36')
print('1*7=7 2*7=14 3*7=21 4*7=28 5*7=35 6*7=42 7*7=49')
print('1*8=8 2*8=16 3*8=24 4*8=32 5*8=40 6*8=48 7*8=56 8*8=喵')
print('1*9=9 2*9=18 3*9=27 4*9=36 5*9=45 6*9=54 7*9=63 8*9=74 9*9=81')
hy1 = int(input('第一个乘数:'))
hy2 = int(input('第二个乘数:'))
print('结果为', hy1*hy2)
elif (Input == 'Divclac'):
py1 = int(input('被除数:'))
py2 = int(input('除数:'))
print(py1/py2, '……', py1//py2)
elif (Input == 'CS'):
py3 = int(input('半径:'))
print('面积为', py3*py3*3.14, '平方米。')
elif (Input == 'SS'):
py4 = int(input('边长:'))
print('面积为', py4*py4, '平方米.')
else:
print('No command in DavidDesktop.')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn