用户:wrmdcxy查看:75 回复:21 评论:75 创建时间:2020-02-19T20:06:38
【作品展示】

【作品介绍】
Windows命令提示符
【作品源代码】
import os,sys
print('Microsoft Windows[版本 10.0.18363.592]')
print('(c) 2019 Microsoft Corporation。保留所有权利。')
while True:
command=input('C:\\Users>')
if command.lower().replace('-f','-s')=='taskkill -s -t cmd.exe':
os.system('cls')
sys.exit(0)
else:
os.system(command)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn程序更改:
import os,sys,getpass
name=getpass.getuser()
os.chdir('C:\\Users\\'+name)
print('Microsoft Windows[版本 喵]')
print('(c) 2019 Microsoft Corporation。保留所有权利。')
while True:
command=input('C:\\Users\\%s>'%(name))
if command.lower()=='taskkill -t -im cm d.exe -f':#此处空格防屏蔽
os.system('cls')
sys.exit(0)
else:
os.system(command)点赞1
评论
//一个简单的射击PvP
world.onPlayerJoin(({ entity }) => {
entity.enableDamage = true;
entity.player.onPress(({ button, raycast:{ hitEntity, direction } }) => {
if (button !== 'action0' || !hitEntity) {
return;
}
hitEntity.velocity.x += direction.x;
hitEntity.velocity.y += 0.5;
hitEntity.velocity.z += direction.z;
hitEntity.hurt(2 * Math.random() + 1, {
attacker: entity,
});
});
});
world.onDie(({ entity, attacker }) => {
if (attacker) {
world.say(attacker.player.name + ' killed ' + entity.player.name)
}
entity.player.forceRespawn();
});
undefined;
world.querySelectorAll('player').forEach((x) => {if (x.player.name == "cangshu") {x.say("指定说问问句")}});
//快捷PVP点赞0
评论
我发现一段代码可以无缝调用命令行,
import os
a = 'c'+'m'+'d' #本来不用怎么麻烦,但怕屏蔽。
os.system('%s.exe' % a)
像真的命令提示符。
点赞1
评论
蒟蒻OIer1048576import os,sys
print('Microsoft Windows[版本 10.0.18363.592]')
print('(c) 2019 Microsoft Corporation。保留所有权利。')
while True:
command=input('C:\\Users>')
if command.lower().replace('-f','-s')=='taskkill -s -t cm'+'d.exe':
os.system('cls')
sys.exit(0)
else:
os.system(command)点赞0
评论
import os,sys
print('Microsoft Windows[版本 10.0.18363.592]')
print('(c) 2019 Microsoft Corporation。保留所有权利。')
while True:
command=input('C:\\Users>')
if command.lower().replace('-f','-s')=='taskkill -s -t cmd.exe':
os.system('cls')
sys.exit(0)
else:
os.system(command)
点赞0
评论
蒟蒻OIer1048576print(' '.join(['{i}*{j}={pro}'.format(i=i,j=j,pro=i*j) for i in range(1,10) for j in range(1,10) if i>=j]))点赞0
评论