Are you asked to create a function and create that variable in the function? If not, then they probably mean that there should be a global variable named
result, but you are creating one locally in your function which ceases to exist as soon as your function returns.
Also note that your code as posted will not run at all, perhaps it should instead look like this:
result = 4 * b
print "The %d is %d."% (perimeterofsquare ,result)
BTW, a function like that would normally not print anything, but instead return the result which can then be printed somewhere else or be used by other functions which isn't possible when you print the result.