0

I don't find any mistakes on my codes but the result is "invalid syntax"

the code are: while True: print('Selamat datang di ATM Progate..') print('\n1 - Cek Saldo \t 2 - Debit \t 3 - Simpan \t 4 - Ganti Pin \t 5 - Keluar') selectmenu = int(input('\nSilahkan pilih menu: ')) if selectmenu == 1: print('Saldo Anda sekarang: Rp. ' + str(atm.checkBalance() + '\n') elif selectmenu == 2: nominal = float(input('Masukkan nominal saldo: ')) verify_withdraw = input('Konfirmasi: Anda akan melakukan debit dengan nominal berikut? y/n' + str(nominal) + '' ) if verify_withdraw == 'y': print('Saldo awal Anda adalah: Rp. ' + str(atm.checkBalance()) + '') else: break if nominal < atm.checkBalance(): atm.withdrawBalance(nominal) print('Transaksi debit berhasil!') print('Saldo sisa sekarang: Rp ' + str(atm.checkBalance()) + '') else: print('Maaf. Saldo Anda tidak cukup untuk melakukan debit!') print('Silahkan lakukan penambahan nominal saldo') elif selectmenu == 3: nominal = float(input('Masukkan nominal saldo: ')) verify_deposit = input('Konfirmasi: Anda akan melakukan penyimpanan dengan nominal berikut? y/n' + str(nominal) + '') if verify_deposit == 'y': atm.depositBalance(nominal) print('Saldo Anda sekarang adalah: Rp ' + str(atm.checkBalance()) + '\n') else: break elif selectmenu == 4: verify_pin = int(input('Masukkan pin Anda: ')) while verify_pin != int(atm.checkPin()): print('Pin Anda salah, silakan masukkan pin: ') updated_pin = int(input('Silakan masukkan pin baru: ')) print('Pin Anda berhasil diganti!') verify_newpin = int(input('Coba masukkan pin baru: ')) if verify_newpin == updated_pin: print('Pin baru Anda sukses!') else: print('Maaf, pin Anda salah!') eli

6th Feb 2021, 4:42 PM
stephanie
2 Answers
+ 3
line 10 ---> (atm.checkBalance() should be (atm.checkBalance()) line 32 ---> indentation of 'else' line 41 ---> unexpected indent https://code.sololearn.com/c42A22a13a21
6th Feb 2021, 4:54 PM
noteve
noteve - avatar
+ 3
Please copy paste your code in a file on code playground and then share the link of that file .
6th Feb 2021, 4:55 PM
Abhay
Abhay - avatar