Email-id program using python
Email-id program using python:-
Email-id
A email-id is a specific address of a mail box which is used the send and recieve mails. Email id is one of the most secure way to transfer files over countries and it send data in encrypted form so that any hacker may not get your file and misuse it. Email-id 's are unique . In an valid Email-id there should be atleast one at the rate symbol (@) also not more than one, one fullstop (.) , and not any spaces.
---------------------------------- code ---------------------------------
print("\t\t\tProgram to check valid email address")
print()
ca=0 # to count spaces
cp=0 # to count no. of @
cs=0 # to count no of full stops
n=input("Enter your Email-id ")
for i in n:
if i==( " " ): # checking spaces
ca=ca+1
if i==("@"): # checking @'s
cp=cp+1
if i==( "." ): # checking fullstops
cs=cs+1
if ca>0: # if Spaces present then invalid email id
print ("invalid email id")
elif cp>1: # if more then 1 @ present then invalid email id
print ("invalid email id")
elif cp!=1: # if no @ present then invalid email id
print ("invalid email id")
elif cs<1: # if more than 1 fullstops present then invalid email id
print ("invalid email id")
else:
print ()
print ('\t\t You inputed Valid Email-id')

0 Comments