Ответсообщение недоступно
Всем привет! Я решил сделать небольшой простой код на python который имитирует выдачу банковских данных, но проблема в том, что программа высвечивает две ошибки (отметил их «!!!»), и я никак не могу их решить. Подскажите пожалуйста, что исправить?
Код:
x= (str("alex_naval")) #user data
y= (str("2000_3000_1000_6700")) #user data
z= (int("577")) #user data
access = False #access is denied
password = str(input ("enter your password: ")) #program password
enter_password = str(input ("enter your password: ")) #password entered by the user
if enter_password == password:
print ("access is allowed")
else:
print ("access is denied")
!!! while True:
if enter_password == password:
access = True
else:
access = False
if access == True:
choice = input("select the information you need:\n 1 - full name\n 2 - card number\n 3 - CVV\n 4 - exit ")
else:
print ("access is restricted")
if choice == 1:
print (f"your full name is: {x}")
elif choice == 2:
print (f"your card number is: {y}")
elif choice == 3:
print (f"your CVV is: {z}")
if choice == 4:
print ("exit from the program")
!!! break
else:
print ("invalid choice")
Помогите решить проблемы именно в местах «!!!», остальное не важно. Только начал изучать питон, не судите строго за ошибки