Check if Python input contains a specific word : <p>This is just INPUT/OUTPUT coding
What is does: You type in "Area" or "perimeter" or "volume" and it will ask for certain strings and calculates it. This code checks for the length and if the input contains numbers, and if it is over the length It will print the error.</p>

<p>OBJECTIVE: If "Area", "perimeter" or "volume" is in the input, proceed to the next function..</p>

<pre><code>print ("This program will find the area, perimeter and volume of the Rectangle!")

    find = input ("Type in one to calculate "area", "perimeter"  and volume": ")

    if len(find) == 4 and find.isalpha():   #This is area, people can type 4 chars and can get away with it, is there a way to fix it?
        w = int (input ("What is the Width of the rectangle: "))
        l = int (input ("What is the Length of the rectangle: "))
        a = w*l
        ans = "The area of the rectangle is %s units!"
        print (ans%(a))
    elif len (find) == 6 and  find.isalpha():   # This is Volume
        w = int(input ("What is the Width of the rectangle: "))
        l = int(input ("What is the Length of the rectangle: "))
        h = int(input ("What is the Height of the rectangle: "))
        v = l*w*h
        ans = "The volume of the rectangle is %s units!"
        print (ans%(v))
    elif len (find) == 9 and find.isalpha():  #This is  Perimeter
        w = int (input ("What is the Width of the rectangle: "))
        l = int (input ("What is the Length of the rectangle: "))
        p = 2*(l+w)
        ans = "The primeter of the rectangle is %s units!"
        print (ans%(p))
    else:
        print ("You spelled area, perimeter or volume wrong, or what you typed in includes NUMBERS!")
</code></pre>
