TypeError:'<' 'int'和'rv_frozen'实例之间不支持

时间:2018-03-06 04:00:02

标签: python typeerror

您好我收到此代码的错误,我不知道如何修复它或者我想要的“rv_frozen”考虑<在x和数字之间,x是明确定义的。至少我想。对python来说比较新,谢谢!

from random import randint
import numpy as np
from scipy import stats
from scipy.stats import uniform

for i in range(h):
    x = randint(0,100)
    if x >= 0 and x <= 15:
        D1 = randint(750000,800000)
        D2 = uniform(D1*0.1,D1*0.5)
        Profit = 65*min(D1,Q)+32*min(D2,max((Q-D1),0))-(Q*55)
        P.append(Profit)
    if x > 15 and x <= 40:
        D1 = randint(550000,750000)
        D2 = uniform(D1*0.1,D1*0.5)
        Profit = 65*min(D1,Q)+32*min(D2,max((Q-D1),0))-(Q*55)
        P.append(Profit)
    if x > 40 and x <= 75:
        D1 = randint(450000,550000)
        D2 = uniform(D1*0.1,D1*0.5)
        Profit = 65*min(D1,Q)+32*min(D2,max((Q-D1),0))-(Q*55)
        P.append(Profit)
    if x > 75 and x <= 100:
        D1 = randint(400000,450000)
        D2 = uniform(D1*0.1,D1*0.5)
        Profit = 65*min(D1,Q)+32*min(D2,max((Q-D1),0))-(Q*55)
        P.append(Profit)

0 个答案:

没有答案