Hey! On pSet6 part one, line 110-20 http://dpaste.com/776923/ why can't you just have return len(self.cleanTiles)? And it feels like I'm sort of behind now..: on line 125-129, where does the randint come from? is that just an arbitrary name given to the method? (I suppose that once you have imported random, you just type random.method()...or?) Thanks!
you can and probably should use len() the docs are your friend. They should have been installed on your computer. If you are using Idle, you can access the docs using F1 - the index tab is very useful. I think the docs installed on your computer are easier to use than the online version. http://docs.python.org/library/random.html#random.randint
@bwCA thanks a lot! i've been away for a week and have forgotten how you look things up.. as for the len(): nice to have come up with a better solution than the sample one:)
and what does "Simulate the raise passage of a single time-step." mean? i write "raise pass" but i don't really know what it means, or if it means anything.. then you should "Move the robot to a new position and mark the tile it is on as having been cleaned." i write: self.cleanTileAtPosition() followed by self.getNewPosition(). there's no sample solution for this one (it just says 'raise notimplementederror') so i would love some feedback. thanks!
def updatePositionAndClean(self): """Simulate the passage of a single time-step.""" you are creating a simulation. your simulation defines what happens in a single time unit. this function does that. you have to write the code for this function that accomplishes everything that is supposed to happen in a single time unit. " Complete the updatePositionAndClean method of StandardRobot to simulate the motion of the robot after a single time-step (as described above in the simulation dynamics). " if you are getting a not implemented error then you are trying to call a function that hasn't had any code written for it.
Join our real-time social learning platform and learn together with your friends!