用户:
瓜木查看:0 回复:0 评论:0 创建时间:2020-11-15T09:19:40
【作品展示】

【作品介绍】
发
【作品源代码】
#Ghost Game
from random import randint
print('Ghost Gome')
feeling_brave = True
score = 0
while feeling_brave:
ghost_door = randint(1, 3)
print('Three doors ahead...')
print('A ghost behind one.')
print('which door do you open?')
door = input('1,2,or 3')
door_num = int(door)
ir door_num == ghost_door:
print('GHOST!')
feeling_brave = False
else:
print('No ghost!')
print('You enter the next room.')
score = score+1
print('Run away')
print('Game over!You scored', score)
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn