'While "Not Equals to" Statement in Python always True

jml_data_sd=input("Berapa banyak data yang anda akan masukan?")
i = 0
while i != jml_data_sd :
    i += 1
    print ('Masukan Data Dari Siswa/i ke', i+1)
    nama_sd.append(input('Masukan Nama Siswa : '))
    user_input(nisn_sd, 'NISN', 8)
    nilai_mtk.append(input('Masukan Nilai Matematika : '))
    nilai_ipa.append(input('Masukan Nilai IPA : '))
    nilai_ind.append(input('Masukan Nilai B. Indonesia : '))
print('Selesai')

    

i'm trying to make a program which asks the user how much data will the user wants to input...then make a while statement which will stops when the program has loop to the point where the user input in "jml_data_sd", but it always go through asking input even though the looping has reach the point where it is the same as where the user input in "jml_data_sd"...Anyone has an answet to this? i will really appreciate, i'm new in Python



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source