Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 9 Online
OpenStudy (anonymous):

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.

OpenStudy (anonymous):

Hand.initialSize http://pastebin.com/QiX6Z9BC like that?

OpenStudy (anonymous):

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'

OpenStudy (anonymous):

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

OpenStudy (espex):

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.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!