Hello there,

I have written a simple function to find the area of a square:

def area_of_square():

side_length = float(raw_input("Length in cm: "))

area = side_length ** 2

if side_length.isalpha():

print “this is not a number”

else:

print area

When I attempt to run this, after I input the “side_length” I get the error stating: ‘float’ object has no attribute ‘isalpha’.

If I get rid of the ‘float’ in front of the ‘raw_input’, it states: unsupported operand types for ** or pow(): ‘unicode’ and ‘int’

^ I am not sure what this even means.

Is there a way to solve this? I would like it to print “this is not a number” if the user inputs a letter and print out the area if it is.

Thanks in advance