So this is what I was able to get for my code for the user input.
import arcpy
import os
from arcpy import env
env.workspace = r"C:\Users\dallascowboy83\Desktop\final project 2\final project\final project.gdb"
env.overwriteOutput = True
#set local variables
tracts = "plano_tract"
#ask user for tract to search
tract = raw_input("Please type Tract Number: ")
#user selects tract, Select by Attribute tool runs
arcpy.MakeFeatureLayer_management("plano_tract", "plano_tract_lyr")
arcpy.SelectLayerByAttribute_management("plano_tract_lyr", "NEW_SELECTION", "Tract_Number = " + tract)
arcpy.CopyFeatures_management("plano_tract", "plano_tract_feat")
#add field
arcpy.AddField_management("plano_tract_feat", "density", "DOUBLE")
#calculate field
arcpy.CalculateField_management("plano_tract_select", "density", "[DP0010001] / [sq_mile_1]", "PYTHON", "")
print "executed successfully"
It does end by saying "executing successfully" but for some reason it just copies the original plano_tract shapefile instead of selecting the attribute and copying the features of the inputed tract. Do I have to use a where clause for this kind of function or is there a mistake somewhere in my code?
Victor