first code attempt

boB Stepp robertvstepp at gmail.com
Wed Aug 2 20:22:20 EDT 2017


On Wed, Aug 2, 2017 at 4:36 PM,  <breezy at bestweb.net> wrote:
> Hello,
> I am using the workbook Computer Coding by Jon Woodcock, published by DK
> WORKBOOKS, to try to learn computer coding. I only get to pages 10 and 11
> in Robot Programs when round robots appear in squares to manipulate them.
> Where in the world do I find robots and squares?

I happened to find preview pages for pages 10-11 on the publisher's website:
https://www.dk.com/us/9781465426857-dk-workbooks-computer-coding/

I suggest you reread page 10 very carefully.  This is a paper and
pencil set of exercises; nothing is typed into the computer.  You have
a "programming language" for your paper and pencil robot with just
three instructions:
    (1) "F":  This instruction moves your robot forward one square.
    (2) "R":  Rotate your robot in place 90 degrees (a quarter-turn)
to the right.
    (3) "L":  Rotate your robot in place 90 degrees (a quarter-turn)
to the left.

The author wants you to figure out what sequence of these three
instructions ("F", "R", and "L") are needed to navigate the paper
robot through the printed mazes provided in the book.  In each problem
the robot starts out on the green circle of each printed diagram and
your task is to get the robot to the square with the checkered flag.
The actual problems are on page 11.  The instructions say that the
robot cannot go through pink walls, so you will have to write down the
correct instructions to get around such obstacles.  Look closely at
the example on page 10.  This shows how to write down the instructions
to get through that simple maze.

Again, this is a paper and pencil exercise with a very simple 3
instruction programming language.  The author is trying to get you to
understand how detailed and simple the steps need to be to program a
computer.  You have to be very specific!  And programming languages
have a very limited vocabulary compared to a natural human language.
Programming language "words" mean very specific things, normally one
such "thing" per word.  English words, for instance, may mean a
variety of things depending on the context where they are being used.

I hope this helps!  Later in the book they will get to how to do
things in the Python programming language (Or so the book description
says.).

You might want to consider joining the Python Tutor list
(https://mail.python.org/mailman/listinfo/tutor).  This is meant for
newcomers to Python who have a lot of basic questions.  This list is
more oriented towards already competent Python programmers who tend to
go off on interesting technical tangents.  ~(:>))

-- 
boB



More information about the Python-list mailing list