Jumat, 26 Juni 2020

Implementasi For Loop Python


#Increment by 3
for i in range(0, 10, 3):
    print(i)

0
3
6
9

index=6
DISTANCE=list()
Target=100
for i in range(0, index):
    fototraining=PATH[i]
    bobot=MBobot[i]
    r=Target-bobot
    print(fototraining+' =>' +str(Target) +' - ' +str(bobot) +' = '+str(r))
    DISTANCE.append(r)


C:\Users\USER\_UVN_Andika_KNN\img\A_DIKA_3.jpg =>100 - [[62.610126]] = [[37.389874]]
C:\Users\USER\_UVN_Andika_KNN\img\D2_DIKA_2.jpg =>100 - [[87.474655]] = [[12.5245]]
C:\Users\USER\_UVN_Andika_KNN\img\D2_DIKA_3.jpg =>100 - [[75.13062]] = [[24.869377]]
C:\Users\USER\_UVN_Andika_KNN\img\D3_DIKA_2.jpg =>100 - [[69.18677]] = [[30.813232]]
C:\Users\USER\_UVN_Andika_KNN\img\D_DIKA_2.jpg =>100 - [[99.99996]] = [[3.81465]]
C:\Users\USER\_UVN_Andika_KNN\img\D_DIKA_3.jpg =>100 - [[62.610126]] = [[37.389874]]
C:\Users\USER\_UVN_Andika_KNN\img\I_DIKA_2.jpg =>100 - [[51.336067]] = [[48.663933]]












Tidak ada komentar:

Posting Komentar