|
楼主 |
发表于 2018-5-18 22:21:09
|
显示全部楼层
本帖最后由 能不能讲点道理 于 2018-5-18 22:25 编辑
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import random
times = 3
secret = random.randint(1,10)
print("----------工作室----------")
guess = 0
print("不妨碍猜一下我现在心里想的是哪个数字", end="jj")
while (guess != secret) and (times > 0):
temp = input()
guess = int(temp)
times = times - 1
if guess == secret:
print("fuck,你是我心中的蛔虫吗?!")
print("哼,猜中了也没什么奖励!")
else:
if guess > secret:
print('大了,大了')
else:
print('小了,小了')
if times > 0:
print('再试一次吧:', end=" ")
else:
print('机会用光喽')
print("游戏结束,不玩啦^_^")
现在显示语法不对。。。invalid syntax |
|