代码拉取完成,页面将自动刷新
import random
print('''
☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆
☆ ☆
☆ ★ ★ ★ ★ ★ ★ ☆
☆ ★ 猜数字游戏 ★ ☆
☆ ★ ★ ★ ★ ★ ★ ☆
☆ ☆
☆ ★ 版权:chfg ★ ☆
☆ ★ 版本:1.0 ★ ☆
☆ ★ 日期:2025.3.12 ★ ☆
☆ ★ 游戏伤身需适度 ★ ☆
☆ ★ 请勿沉迷游戏 ★ ☆
☆ ☆
☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆ ☆''')
computer = random.randint(1,100)
chances = 5
while chances > 0:
player = int(input('来吧,输入你猜的数字(嘻嘻,你可没几次机会哟):'))
if player == computer:
print('居然让你走了狗屎运,才对了,啧~')
break
elif player < computer:
print('猜小了吧,你果然就是不行嘛')
else:
print('猜大了吧,你果然就是不行嘛')
chances -= 1
if chances == 0:
print('呦呦呦,你输了,哈哈哈哈哈哈,嘿嘿,告诉你吧,答案是',computer)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。