Make Email checker using python.

                 Welcome to email checker


This is simple format email checker using python.




print("\n ******** Welcome to Email checker. *********\n\n")

while True:
    email = input("Enter an email: ")  # name@gmail.com, name@gmail.in
    k, j, d = 0, 0, 0
    if len(email) >= 6:
        if ('@' in email) and (email.count("@") == 1):
            if email[0].isalpha():
                if (email[-3] == ".") ^ (email[-4] == "."):
                    for i in email:
                        if i == i.isspace():
                            k = 1
                        elif i.isalpha():
                            if i == i.upper():
                                d = 1
                        elif i.isdigit():
                            continue
                        elif i == '_' or i == '@' or i == '.':
                            continue
                        else:
                            j = 1
                    if k == 1 or j == 1 or d == 1:
                        print("This email is wrong. Please use only [ _, @, . ] characters in the email and avoid spaces.")
                    else:
                        print("This is a valid email.")
                        break  # Exit the loop when a valid email is entered
                else:
                    print("This email is wrong. Please ensure '.' is used at the correct position and '@' is followed by 'gmail.com' in the email.")
            else:
                print("This email is wrong. The first character must be an alphabet.")
        else:
            print("This email is wrong. Please ensure '@' is used exactly once in the email.")
    else:
        print("This email is wrong. Please use a minimum of 6 characters in the email.")

Comments

Popular posts from this blog

Binary to Number converter.

Python Tkinter QR Code Generator

color guessing game with GUI using python