MoveAndTurn Part 1

Yesterday I saw the CS Advanced Placement pop quiz by The New York Times, and it was very inspiring.

Especially quiz number 5 the MoveAndTurn problem. I made a Scratch project about it:

The most interesting part of this project is the generation of a random path. To create it I used a greedy method where in each step the path moves towards the end either on x-axis or on y-axis.

scratchblocks

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s