[docs] Python Error - Validation - Format Checking

Bok cameronleigh1412 at gmail.com
Fri Jun 23 04:51:48 EDT 2017


We are in the middle of completing format checks in a program we are
writing, it keeps giving us an error. We do not understand why. I hope you
can explain why or help us.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20170623/b0fda899/attachment.html>
-------------- next part --------------
import re
print("We are collecting some data to see if you qualify for our job ")
age=input("What is your age? ")
if len(age)== 2:
    print("Your age is 2 digits long")
    if int(age) >=18 and int(age)<=50:
        print("Your age is between 18-50")
        email=input("What is your email: ")
        pattern="^[A-Za-Z0-9]+\@[A-Za-z0-9]+\.[A-Za-z0-9]+$"
        emailmatch=re.match(pattern, email)
        if emailmatch:
            print("You entered a valid email")
            name=input("What is your full name: ")
            pattern1="^[A-Za-z]$"
            namematch=re.match(pattern1, name)
            if namematch:
                print("You entered your name")
                if name.isupper()==True:
                    print("You have a capital letter in your name")
else:
    print("Error")


More information about the docs mailing list