Just try it out..
"""Returns the square of a number."""
squared = original**2
print "%d squared is %d." % (original, squared)
original = raw_input('Enter a number to be squared:')
"""The reason your are getting this error is, you are accepting the number from user and user can enter any data. It might be string or number. The point is that anything you accept using raw_input you will get as a 'string'. To perform any math operation on you have to convert that 'string' into 'int' first. So in my above snip-code at the time of calling function, I've passed converted value.
The second way is that you can pass same value but before performing math operation you need to convert it into 'int' like...
Call the as it is function
Before calculating or at the time of calculating do this
suared = int(original) ** 2
Note: Make sure that, if you are writing code, which will accept data from user first check that the given data is valid or not for instance.
If user input the 'string' like "three" or "five" then
Your code should be independent and error free."""