Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions Address Validator/AddressValidator.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
# email has contain atleast one "." and only one "@"
# Email has not contain spaces


def addressVal(address):
dot = address.find(".")
at = address.find("@")
if (dot == -1):
print("Invalid")
elif (at == -1):
print("Invalid")
at_count = address.count("@")

if (
dot >=1
and at > 0
and at_count == 1
and " " not in address
and address.endswith("@gmail.com")):
print("Valid Email")
else:
print("Valid")
print("invalid Email")

print("This program will decide if your input is a valid email address")
while(True):
Expand Down
Empty file.
Binary file not shown.