From 3fb43da7116715544b52350a4b36fddf4cc6fca2 Mon Sep 17 00:00:00 2001 From: kouhe <563554545@qq.com> Date: Sat, 26 Mar 2022 12:34:08 +0800 Subject: [PATCH] back to menu when register finished --- main.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index b5861e5..0cc61d5 100644 --- a/main.py +++ b/main.py @@ -28,7 +28,7 @@ while True: elif input_number == "2": input_username = input("Enter a username\n") input_password = input("Enter a password\n") - # check if the username is in the dictionary so it is duplicate + # check if the username is in the dictionary it is duplicate if input_username in username_and_password: print("The username is duplicate!") else: @@ -65,12 +65,11 @@ while True: # add the username and password to the dictionary username_and_password[input_username] = input_password print("Register successfully!") - print("Auto login...") - exit() + # back to menu + continue else: - print("Wrong number!") # if the input is not 1 or 2, it will print wrong number + print("Wrong number!") # if the input is not 1 or 2, it will print wrong number os.system("pause") os.system("cls") # clear the screen -