I can’t figure this problem out.
Suppose there’s a world with 2 locations, A and B. The vacuum cleaner agent goes into one of these locations, determines which location it’s in and whether there’s dirt in it, if there is it cleans it, and if not it goes to the next location.
How would you write it in Python?
It looks simple enough, but I got some weird mental block against it.
Comments are closed.
come on, it’s matter of manipulation of some basic variables:
1.Create a class for the vacuum cleaner and a methods call clean ,which has a list of location objects and implement the logic of cleaning in it
2.Create an object of that vacuum cleaner and fire up the clean method on it
I am not really sure if you can write a simulation in Python. If so, that would be pretty hard. Why don’t you try to download Autodesk Inventor Pro? If you are going to write a simulation in DOS, my reccomendation is C++ or PHP