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

Hi, In the solution of ps6 I get the message: " File "C:\Users\wilkenfe\Desktop\limudim\python\Unit2\le5\ps6\ps6.py", line 253, in updatePositionAndClean candidatePosition = self.Position.getNewPosition(self.direction,self.speed) AttributeError: 'StandardRobot' object has no attribute 'Position'". What does it mean and how can I fix it?

OpenStudy (rsmith6559):

self refers to this object, this instance of the class that you created it from. I bet that was StandardRobot. I doubt that StandardRobot has an attribute named Position (attribute names are case-sensitive). Usually only names of classes are capitalized.

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!
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!