The error you are getting is called an AttributeError, the error message also suggests that it is in the code 'head.Shape('Square')'.
An AttributeError suggests that you are getting this error because you are tring to access an attribute or method that does not exist on the object. In your case it is the method named Shape on the head object. This is because you are capitalizing the first letter of the word Shape and it should be shape.
So you can resolve this error by replacing
Also notice the parameter Square should also have its first letter lower cased as square.
You can learn more about python and it's methods using this video: