我有以下代码:
for i in range(0,numClass):
if breaks[i] == 0:
classStart = 0
else:
classStart = dataList.index(breaks[i])
classStart += 1
classEnd = dataList.index(breaks[i+1])
classList = dataList[classStart:classEnd+1]
classMean = sum(classList)/len(classList)
print classMean
preSDCM = 0.0
for j in range(0,len(classList)):
sqDev2 = (classList[j] - classMean)**2
preSDCM += sqDev2
SDCM += preSDCM
return (SDAM - SDCM)/SDAM
我想将此代码转换为VB.NET.
但我不确定if-elseif语句的结束位置.
它是在“classStart = 1”之后结束的吗?
我觉得在Python中看到for-next-loops的结局有点困难.
谢谢.