ps10 prob 4: the class Hand assigns a var self.initialSize. I want to use this variable in my class ComputerPlayer but I am not sure of the syntax on how to access it.
That gives the following error message File "C:\Python27\ps10 prob 4", line 254, in pickBestWord n=Hand.initialSize AttributeError: type object 'Hand' has no attribute 'initialSize'
well.. we can't really know how you are trying to use it unless you post your code or even just a simplified version showing what you are trying to do. have you read section nine of the tutorial? http://docs.python.org/tutorial/classes.html
Well that error indicates that the class "Hand" does not have an "initialSize" variable, therefore you cannot assign it a value since it does not exist.
Join our real-time social learning platform and learn together with your friends!