What is a street in karel world



More Basic Karel


Karel's World

You can think of Karel's world as a grid. At any time, Karel occupies the space at a specific row and column. We call rows
streets
and columns
avenues
.

Karel's Directions

The world is organized along the basic cardinal directions (clockwise, from the top: North, East, South, West). Karel is aware of the direction he's facing. You can use functions like and to control Karel's direction, but we'll get more into that later.

Using Karel's Commands

We can use Karel's commands to create new
programs
. A program is like a list of actions that we want Karel to perform.

Let's have Karel put down a ball in the middle of the world, as shown below.



The first command we'll need is to have Karel move forward. Then Karel will and again to get to the center of the world. Once there, Karel can use to set down a ball, then three times to face the starting direction.

We can write out the program like a list:




More Basic Karel


Karel can navigate a world by moving and turning left within it. Karel can also take balls and put balls down. Recall that these are the only four commands Karel knows:

Karel resides in a boxed-in world. Let's review the basic components of Karel's world.

Karel's World

Karel's world is a grid composed of
walls
,
streets
, and
avenues
.

Walls:


Walls
block Karel's movement. Walls include the borders of a world as well as any lines running through the world.



Karel cannot move through walls! If Karel attempts a command while directly in front of a wall, Karel will
crash
into it.

Streets:

A
street
is a
row
in the grid.



The
5th row
, or
5th street
, is highlighted in the example world above.

Avenues:

An
avenue
is a
column
in the grid.



The
8th column
, or
8th avenue
, is highlighted in the example world above.

Karel's Direction

Karel can face one of four directions at any given time -
north
,
east
,
south
, or
west
. The direction Karel is facing determines which direction Karel will move. If Karel is facing north, a command will make Karel move up. If Karel is facing east, a command will make Ka


If you have already installed the package, we are ready to start using it. We will execute the command to be able to use it:

First of all, we need to create a
world
so that Karel can move around. We do this with the instruction , specifying the name of the world we want to use inside the parentheses and with quotation marks. The package includes several worlds that we will explore, for example:



As you can see in the image, Karel’s world has some elements:



We call each row of the rectangular world a
street
, meaning that the streets run horizontally.



The
avenues
run vertically (they are the columns). The intersection between a street and an avenue is called a
cell
, which can be identified by the numbers outside the box.



Karel is always facing one of the four possible directions:
east
,
north
,
west
, or
south
.



The black borders represent
walls
, which are barriers that Karel cannot pass through; it can only go around them. Karel also cannot leave the rectangle that delimits the world.



The square in cell (2, 1) is an
item
. Karel can traverse the world by placing and picking up
items
. There can be more than one
item
in a cell, in which case we

About Karel's World


What is Karel
Karel is a robot living in a simple world represented on your computer screen.

Karel (facing north)


A little picture of Karel's world.

How can Karel get about in his world?
Karel's world is crisscrossed by horizontal
streets
and vertical
avenues
which are represented by lines on your computer screen. Karel can only stand at
corners
where a street and avenue intersect. He can move and turn about, but he must stay on the streets and avenues and can only stop at corners.
What directions can Karel face?
Karel can face in any of the directions
north
(toward the top of the screen),
south
(toward the bottom),
east
(toward the right), and
west
(toward the left).
What objects appear in Karel's World
There are two other kinds of things in Karel's world besides Karel:
walls
, and
beepers
.
What are walls?
The walls in Karel's world are made of neutronium (an impenetrable metal). They appear as dar obstructions between street corners in Karel's world.

Wall Section (east-west)


What are beepers?
Beepers are small platic cones that make a quiet beeping sound. They may appear at street corners and may be picked up or plac