I'm new here and this is my first question. Apologies for any shortcomings.
I'm trying practise using a simply code. This example has the below output:
*who are you?
Joe
Hello Joe. What is the password? (It is a fish)
hoki
Access granted
Hello Joe. What is the password? (It is a fish)*
The code I am using is:
while True:
print('who are you?')
name = input()
if name != 'Joe':
continue
while True:
print('Hello Joe. What is the password? (It is a fish)')
password = input()
if password !='hoki':
continue
print('Access granted')*
As im trying to get out of the second while True loop using the continue statement (if the answer to the password question is hoki) it asks again "Hello Joe. What is the password? (It is a fish)*
It should be ending and not asking me for the password again as I've entered the correct one.
Any advice is appreciated. Thanks