I tried to make the security by PIN code, but it's not working... how to do it?
I've been trying to create program, which ask for PIN. If you write the PIN 3 times incorrect, the program is going to say you goodbye and then program ends. Also if you write correct PIN CODE, the program allow you to continue to the next step of the code.
import time
money=1000
pokus=0
pin=7863
print("Vitajte v programe bankomat!")
for i in range(3):
vstup=int(input("Zadaj Váš 4-číselný PIN: "))
if vstup == 7863:
break
elif vstup != 7863:
pokus=pokus+1
print("Nesprávny PIN kód. Počet zostávajúcich pokusov: {}".format(3-pokus))
continue
if pokus == 3:
print("3x zadaný zlý PIN kód. DOVIDENIA!")
time.sleep(3)
quit()
elif pokus < 3:
continue
If I start the program, it says me "Write your PIN CODE." If I write the PIN CODE correct on the first try, program will continue to next step, but if I write 3 times incorrect PIN code, the program is going to continue too. I've been tried to fix it somehow else... I've tried to fix it by while loop except of for loop, but it doesn't work. I don't know what is wrong now... I'll be thankful for every reactions and advices.