Thursday, January 31, 2008
Post 13
My program for step 17 is still plaguing me, because it won't work with walls of different dimension. I just can't find a way to solve it, but i will eventually.
Wednesday, January 30, 2008
Post 12
define turneast:
while not_facing_east:
turnleft
define turnwest:
while not_facing_west:
turnleft
define turnnorth:
while not_facing_north:
turnleft
define turnsouth:
while not_facing_south:
turnleft
define pickall:
while next_to_a_beeper:
pickbeeper
define movewall:
while front_is_clear:
move
define cleartowall:
while front_is_clear:
pickall
move
pickall
cleartowall
turnleft
move
turnoff
while not_facing_east:
turnleft
define turnwest:
while not_facing_west:
turnleft
define turnnorth:
while not_facing_north:
turnleft
define turnsouth:
while not_facing_south:
turnleft
define pickall:
while next_to_a_beeper:
pickbeeper
define movewall:
while front_is_clear:
move
define cleartowall:
while front_is_clear:
pickall
move
pickall
cleartowall
turnleft
move
turnoff
Tuesday, January 29, 2008
Post 11
Sometimes you don't know where someone will put your robot. The program is dependent on knowing this information, so you need to find a way to be certain of your starting position. I found a way to get to a location every time so that the program will work. Still, that's just the beginning.
Monday, January 28, 2008
Post 10
For some strange reason, I found step 14 easier than step 15. Step 14 is an "unknown" world, so it should be harder. But even so, writing that program was easier than the writing the one for step 15. I didn't really get it, but I'm going to go over it again.
Post 9
Even though I missed class today, I had someone explain what I missed. My field trip was fun, but it was nothing compared to Computer Programming...:p. To me, algorithms seem like a complex but efficient way of writing programs for unknown worlds. This is helpful, because in real life, we do not always know all the details. A properly written algorithm can get around this problem.
Thursday, January 24, 2008
Post 8
I really get what the tutorial means when it says Python is really picky about code. It's so annoying when I make a mistake, but at least I'm learning to be more careful. I don't really like to do all the checking.
Wednesday, January 23, 2008
Post 7
I'm a little confused about the "do" and "while" statements, but it is clearing up bit by bit. Its a bit amusing that Guido keeps "learning" new things. I also have to keep reminding myself to be more and more careful with my codes, because there are more and more potential mistakes.
Subscribe to:
Posts (Atom)