基本上,我有两支球队有他们的起跑线,并使用一个简单的公式,包括每个球员的进攻和防守评级来确定得分。我计划随着时间的推移扩展这一点,显然会使分数有所不同,而且并不总是相同的;但是,现在我只想找出我一直在犯的错误。在
代码如下:#Player Database
#Player = [OR,DR]
#Miami Heat
Chris_Bosh = [114-90,103-100]
Udonis_Haslem = [110-90,103-100]
Lebron_James = [125-90,101-100]
Dwayne_Wade = [112-90,103-100]
Mario_Chalmers = [110-90,104-100]
#San Antonio Spurs
Tim_Duncan = [107-90,95-100]
Tiago_Splitter = [118-90,100-100]
Kawhi_Leonard = [114-90,99-100]
Manu_Ginobili = [107-90,100-100]
Tony_Parker = [116-90,106-100]
#Team Database
MIA = [Chris_Bosh,Udonis_Haslem,Lebron_James,Dwayne_Wade,Mario_Chalmers]
SAS = [Tim_Duncan,Tiago_Splitter,Kawhi_Leonard,Manu_Ginobili,Tony_Parker]
#Engine
def engine():
#calculation:
MIA[0[0]] + SAS[0[1]] + MIA[1[0]] + SAS[1[1]] + MIA[2[0]] + SAS[2[1]] + MIA[3[0]] + SAS[3[1]] + MIA[4[0]] + SAS[4[1]] == MIAs
SAS[0[0]] + MIA[0[1]] + SAS[1[0]] + MIA[1[1]] + SAS[2[0]] + MIA[2[1]] + SAS[3[0]] + MIA[3[1]] + SAS[4[0]] + MIA[4[1]] == SASs
print ("Miami", MIAs," ", "San Antonio", SASs)
engine()
错误就在这里:
^{pr2}$