Python这里是什么问题啊。呜~

Python这里是什么问题啊。呜~,第1张

Python这里是什么问题啊。呜~

import  random
ff = random.randint(1,10000)
temp = input("不妨猜一下小甲鱼现在心里想的是那个数字:")
guess = int(temp)
fh = int(ff)
if guess == fh:
    print("答对了")
    print("不玩了")
if guess > fh:
    print("大了")
    i = 20
    while i-1 and guess != fh:
        temp = input("不妨猜一下小甲鱼现在心里想的是那个数字:")
        guess = int(temp)
        if guess == fh:
            print("答对了")
            print("不玩了")
        if guess != fh:
            if guess > fh:
                if (guess - fh) >= 5000: dechuwenzi = ("偏的太离谱了")
                if (guess - fh) >= 3000 and (guess - fu ) < 5000: dechuwenzi = ("太远")
                if (guess - fu) >= 1000 and (guess - fu ) < 3000: dechuwenzi = ("远")
                if (guess - fu) >= 500 and (guess - fu) < 1000: dechuwenzi = ("近")
                if (guess - fu) >= 100 and (guess - fu) < 500: dechuwenzi = ("非常的接近")
                if (guess - fu) >= 50 and (guess - fu) < 100: dechuwenzi = ("再小一些些")
                if (guess - fu) >= 10 and (guess - fu) < 50: dechuwenzi = ("快了快了再小一丢丢")
                if (guess - fu) >= 5 and (guess - fu) < 50: dechuwenzi = ("再小一点点的一点点")
                if (guess - fu) >= 2 and (guess - fu) < 5: dechuwenzi = ("胜利就是下一个数字了,快快快")
            print(dechuwenzi)
            if guess < fh:
                if (fh - guess) <= 5000: dechuwenzi = ("偏的太离谱了")
                if (fh - guess) <= 3000 and (guess - fu ) > 5000: dechuwenzi = ("太远")
                if (fh - guess) <= 1000 and (guess - fu ) > 3000: dechuwenzi = ("远")
                if (fh - guess) <= 500 and (guess - fu) > 1000: dechuwenzi = ("近")
                if (fh - guess) <= 100 and (guess - fu) > 500: dechuwenzi = ("非常的接近")
                if (fh - guess) <= 50 and (guess - fu) > 100: dechuwenzi = ("再小一些些")
                if (fh - guess) <= 10 and (guess - fu) > 50: dechuwenzi = ("快了快了再小一丢丢")
                if (fh - guess) <= 5 and (guess - fu) > 50: dechuwenzi = ("再小一点点的一点点")
                if (fh - guess) <= 2 and (guess - fu) > 5: dechuwenzi = ("胜利就是下一个数字了,快快快")
                print(dechuwenzi)
        i = i - 1
if guess < fh:
    print("小了") 
    i = 20
    while i-1 and guess != fh:
        temp = input("不妨猜一下小甲鱼现在心里想的是那个数字:")
        guess = int(temp)
        if guess == fh:
            print("答对了")
            print("不玩了")
        if guess != fh:
            if guess > fh:
                if (guess - fh) >= 5000: dechuwenzi = ("偏的太离谱了")
                if (guess - fh) >= 3000 and (guess - fu ) < 5000: dechuwenzi = ("太远")
                if (guess - fu) >= 1000 and (guess - fu ) < 3000: dechuwenzi = ("远")
                if (guess - fu) >= 500 and (guess - fu) < 1000: dechuwenzi = ("近")
                if (guess - fu) >= 100 and (guess - fu) < 500: dechuwenzi = ("非常的接近")
                if (guess - fu) >= 50 and (guess - fu) < 100: dechuwenzi = ("再小一些些")
                if (guess - fu) >= 10 and (guess - fu) < 50: dechuwenzi = ("快了快了再小一丢丢")
                if (guess - fu) >= 5 and (guess - fu) < 50: dechuwenzi = ("再小一点点的一点点")
                if (guess - fu) >= 2 and (guess - fu) < 5: dechuwenzi = ("胜利就是下一个数字了,快快快")
                print(dechuwenzi)
            if guess < fh:
                if (fh - guess) <= 5000: dechuwenzi = ("偏的太离谱了")
                if (fh - guess) <= 3000 and (guess - fu ) > 5000: dechuwenzi = ("太远")
                if (fh - guess) <= 1000 and (guess - fu ) > 3000: dechuwenzi = ("远")
                if (fh - guess) <= 500 and (guess - fu) > 1000: dechuwenzi = ("近")
                if (fh - guess) <= 100 and (guess - fu) > 500: dechuwenzi = ("非常的接近")
                if (fh - guess) <= 50 and (guess - fu) > 100: dechuwenzi = ("再小一些些")
                if (fh - guess) <= 10 and (guess - fu) > 50: dechuwenzi = ("快了快了再小一丢丢")
                if (fh - guess) <= 5 and (guess - fu) > 50: dechuwenzi = ("再小一点点的一点点")
                if (fh - guess) <= 2 and (guess - fu) > 5: dechuwenzi = ("胜利就是下一个数字了,快快快")
                print(dechuwenzi)
        i = i - 1
print("游戏结束")

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5659600.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存