Test-A
unknown
python
12 days ago
724 B
3
Indexable
from karel.stanfordkarel import * """ Each row starts with a stack of beepers. Karel should pick them up, one at a time, and spread them down the row. Caution! Karel can't count, and starts with infinite beepers in her bag. How can you solve this puzzle? """ def main(): """ """ move() while beepers_present(): pick_beeper() while no_beepers_present(): put_beeper() if front_is_clear(): move() elif front_is_blocked(): turn_left() turn_left() turn_left() while front_is_clear(): move() # There is no need to edit code beyond this point if __name__ == '__main__': main()
Editor is loading...
Leave a Comment