Jeroo Basics – Intro to Computer Programming, Topic 1 – Study Notes
offline

TL;DR

Jeroo is a teaching language where you control a kangaroo-like creature on a grid island. You learn to create Jeroo objects, move them with hop(), turn them with turn(), and read grid coordinates. Directions are relative to the Jeroo's facing, not absolute, which is the single concept most students trip over first.


Difficulty: Beginner

Prerequisites: None. This is the first topic in the course.

Big Picture

Jeroo is the first programming environment you will use in this course. It exists to teach the fundamentals of giving instructions to a computer: creating objects, calling methods on those objects, and thinking about sequence and direction. Everything you learn here (object creation, method calls, parameters, coordinate systems) transfers directly to Java, Python, or whichever language comes next in the course. The grid world keeps the feedback visual so you can see immediately whether your code did what you intended.


Key Terms

Jeroo

The object you control in the Jeroo programming environment, a kangaroo-like creature that lives on a grid island. Think of it as your first programmable robot.

Instantiation (creating a Jeroo)

The act of creating a new Jeroo object using the constructor call Jeroo(). In simple terms, this is how you bring your Jeroo into existence on the island so you can start giving it commands.

hop()

A method that moves the Jeroo one space forward in whatever direction it is currently facing. Accepts an optional integer parameter, e.g. hop(5), to move multiple spaces in one command. Think of it as "take a step" (or "take N steps").

turn()

A method that rotates the Jeroo in place. Takes a relative direction as its parameter, e.g. turn(RIGHT) or turn(LEFT). The Jeroo does not move to a new cell; it just changes which way it faces.

Relative directions

LEFT, RIGHT, AHEAD, and HERE. These are defined relative to the Jeroo's current facing, not to the compass. In simple terms, "right" means "to my right," not "east."

Compass directions (absolute directions)

NORTH, SOUTH, EAST, WEST. These describe facing on the island grid and do not change when the Jeroo turns. The Jeroo always faces one of these four.

Island

The grid world where the Jeroo lives. Coordinates are given as (column, row), starting from (0, 0) at the top-left corner.

Flower

An item a Jeroo can pick up from a cell on the island. Flowers are used in later topics for conditional logic and problem-solving tasks.

Net

An obstacle on the island. Walking into a net without a flower to toss will end the programme. Nets teach you to check your surroundings before moving.


Creating and Moving a Jeroo

  • Creating a Jeroo: assign the constructor to a variable name.

    • neo = Jeroo() creates a Jeroo called neo at the default position, facing East.

    • The variable name is your handle for every command you give it afterwards.

  • Moving forward: call hop() on your Jeroo.

    • neo.hop() moves neo one space forward in its current facing direction.

    • neo.hop(5) moves it five spaces forward in a single command.

    • The parameter inside hop() is optional. No parameter means one space.

  • Method-call syntax: the pattern is always objectName.method(parameter).

    • The dot connects the object to the action.

    • This is the same syntax you will see later in Java and Python.

Relative Directions and Turning

  • The four relative directions are: LEFT, RIGHT, AHEAD, HERE.

    • These are always relative to the Jeroo's current facing, never to the compass.

  • Turning: neo.turn(RIGHT) rotates the Jeroo 90° clockwise from wherever it is facing.

    • If neo faces South and you call neo.turn(RIGHT), it now faces West.

    • If neo faces South and you call neo.turn(LEFT), it now faces East.

  • The most important thing to remember: turning is relative to the Jeroo's own direction, not to yours as you look at the screen. "Right" means the Jeroo's right, based on the way it is currently pointing.

  • AHEAD means the direction the Jeroo is already facing. HERE refers to the cell the Jeroo is standing on.

The Island Grid and Coordinates

  • Coordinate format: (column, row), with (0, 0) at the top-left corner of the island.

    • Columns increase going right. Rows increase going down.

    • This is the opposite of standard maths graphing, where y increases upward.

  • Reading a location from the island map:

    • Count columns from the left edge (starting at 0) to get the first number.

    • Count rows from the top edge (starting at 0) to get the second number.

  • Example from the worksheet island:

    • Flower location: (0, 3), meaning column 0, row 3.

    • Net location: (2, 1).

    • Jeroo location: (1, 1), facing South.

  • Water surrounds the island. Moving into water ends the programme, just like hitting a net.


Common Misconceptions

  • Students often think LEFT and RIGHT refer to the screen's left and right. They do not. They refer to the Jeroo's own left and right, based on its current facing.

  • Students often assume coordinates are (row, column). Jeroo uses (column, row), which catches people out on every early assignment.

  • Students sometimes forget that hop() with no parameter still moves the Jeroo one space. It does not keep the Jeroo in place.

  • Students sometimes think turn(RIGHT) moves the Jeroo to the cell on its right. It does not move the Jeroo at all. It only rotates it.


Why It Matters / Exam Flags

⚠️ Expect questions that give you a Jeroo's compass facing and ask what it faces after one or two turns. Work these out by pointing your finger in the starting direction and physically turning.

⚠️ Grid coordinate questions almost always appear. Know that (0, 0) is top-left and the format is (column, row).

⚠️ You will be asked to write short sequences of hop() and turn() calls to navigate a Jeroo from one cell to another. Practise chaining these.

⚠️ The difference between relative directions (LEFT, RIGHT, AHEAD, HERE) and compass directions (NORTH, SOUTH, EAST, WEST) is a classic exam distinction.


Quick Self-Test

  1. True or False: hop(3) moves the Jeroo three spaces forward.

  1. True or False: turn(LEFT) moves the Jeroo one space to the left.

  1. Fill in the blank: The four relative directions are LEFT, RIGHT, ______, and ______.

  1. True or False: In the Jeroo grid, (0, 0) is at the bottom-left corner.

  1. Fill in the blank: If a Jeroo faces North and turns RIGHT, it now faces ______.


Practice Q&A

Q: Write the code to create a Jeroo named kim.

A: kim = Jeroo()

Q: Write one line of code to move kim forward 4 spaces.

A: kim.hop(4)

Q: A Jeroo is facing East. You call turn(RIGHT). What compass direction does it face now?

A: South. Right from East is South (90° clockwise).

Q: A Jeroo is facing West. You call turn(LEFT). What compass direction does it face now?

A: South. Left from West is South (90° anticlockwise).

Q: On the Jeroo island grid, what is the coordinate of the top-left cell?

A: (0, 0).

Q: A Jeroo is at (3, 2) facing North. After hop(2), what is its new position?

A: (3, 0). Facing North means moving up the grid, which decreases the row number by 2.

Q: What is the difference between relative directions and compass directions?

A: Relative directions (LEFT, RIGHT, AHEAD, HERE) depend on the Jeroo's current facing. Compass directions (NORTH, SOUTH, EAST, WEST) are fixed and describe the Jeroo's absolute facing on the island.


Connections to Other Topics

This connects to object-oriented programming because creating a Jeroo with Jeroo() is your first encounter with constructors and calling methods on objects, a pattern that carries into Java and Python.

The coordinate grid connects to any later work with 2D arrays or matrices, where row/column indexing follows the same top-left origin convention.

Relative versus absolute directions will reappear whenever you work with robotics, turtle graphics, or any system where an agent has its own frame of reference.


Related Terms / Search Tags

Jeroo, Jeroo programming, Jeroo basics, Jeroo tutorial, Jeroo hop, Jeroo turn, Jeroo island, Jeroo grid coordinates, Jeroo relative directions, Jeroo compass directions, Jeroo constructor, Jeroo worksheet, Intro to Computer Programming, UT Austin CS, object-oriented basics, method calls, grid world programming, turtle graphics, Karel the Robot, educational programming language