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

ps11: can someone post a solution through problem 3? My implementation of updatePositionAndClean(self) is pretty dense and I have a bug I can't figure out. code here: http://codepad.org/DZR49b59#comment-bdYKRDeo There's a while loop in lns 234-268 that is pretty dense, but that doesn't seem to be the problem. I posted the output in a comment at the bottom of the page.

OpenStudy (anonymous):

figured it out -- my code breaks if a robots position is at 0,0 or max,max. Is there an easier way to do what I'm doing in the while loop?

OpenStudy (anonymous):

actually, i'm not sure that's the problem. There was a problem where a robot could be initialized to position 0,0 or max,max, but I took care of that and I'm still getting errors that the program tries to set the robots position outside of the room

OpenStudy (anonymous):

this guy posted complete solutions. I working on PS11 myself, so I haven't looked, but his solutions to other problem sets have been very good (I think he's a professional programmer ... which would explain why they're so good). https://github.com/sebrenner/Mit-6.00-OCW-Problem-Set-Solutions#readme

OpenStudy (anonymous):

hmmm, i moved, if it wasn't in the room i kept changing directions till it was in the room, then cleaned it. http://dpaste.com/705243/

OpenStudy (anonymous):

thanks!

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!