Bài 14. Giải quyết vấn đề

datcoder

Em hãy lập chương trình ngôn ngữ Scratch mô phỏng thuật toán bám tường.

Người Già
23 tháng 5 lúc 21:02

when green flag clicked

forever

    if <not <touching color [#000000] ?>> then

        turn left 90 degrees

        move 10 steps

    else

        if <not <touching color [#000000] ?>> then

            move 10 steps

        else

            turn right 90 degrees

    end

end