我的狀況有問題。我想變tabPoint
爲10和100之間條件「和」,「或」
def demand(nb):
tabName = [];
tabPoint = [];
for i in range(nb):
tabName.append(raw_input("Name of the jumper " + str(i+1) + " : "))
tabPoint.append(input("1st jump " + tabName [i] + " The number must be between 10 and 100: "));
if int (tabPoint[i] < 5) and int (tabPoint[i] > 100):
tabPoint.append(input("The number must be between 10 and 100 "));
return tabName, tabPoint;
name, point = demand(3)
print(name, point)
1)你的圓括號在錯誤的地方。 2)小於5且*大於100 *?這怎麼可能? – asongtoruin
你也不需要';'在行結尾 – depperm
你希望它小於5 *和*大於100?這不可能。你的意思是*還是*? – Carcigenicate