0
I am new to the world of technology, I work more with HTML and CSS and for pleasure, I study Python. I was trying to do a simple check, but it involved functions. (for study)
Where the error appears to me and I can’t understand the problem
def login():
print('Vamos realizar o login ...')
user = str(input('Login: '))
password = str(input('Password: '))
if user == 'admin' and password == 123:
print('Login feito com sucesso')
menu()
else:
print('Login e senha incorretos, tente novamente')
login()
def menu():
print('Bem vindo(a) ao menu do sistema')
opcao_inicial = str(input('[1] - Login\n[2] - Sair'))
if (opcao_inicial == 1):
print('Indo para o Login ...')
login()
elif (opcao_inicial == 2):
print('Finalizando sistema')
else:
print('Valor invalido, escolha a opção novamente')
menu()
print('Ola, seja bem vindo ao sistema')
login()
Where I put the data correctly but it only gives me the condition that has the password or incorrect login.
That’s right, I was so attentive to the concept, that I always make mistakes in these silly mistakes, that make total difference, thank you. I will pay more attention
– Jose Marinho