#Slightly more advanced solution with 3 attempts
def main():
	secretPassword = 'p4ssw0rd'
	
	maxAttempts = 3	

	for i in range(maxAttempts):
		enteredPassword = input('Please enter your password: ')
		if (enteredPassword == secretPassword):
			print("Password accepted. Welcome!")
			break;
		else:
			print("Password incorrect. Please Try Again. "+str(maxAttempts-(i+1))+" attempts left.")
main()
