BYU logo Computer Science

To start this assignment, download this zip file.

The following guide pages cover material needed for this assignment:

The following link covers essentials of using Bit: Bit Reference

Project 1 - Bit

Reminder: problems 2-4 need to pass the two separate worlds for each problem.

1. Y

Draw two Ys. Bit starts in this world:

a large empty world, bit in the top left one row down

Bit should finish in a world that looks like this:

the same world, with two blue Ys, bit in the top right one row down

Be sure you have Bit’s position and direction correct as well!

2. Go Go Go

Bit starts in a world like this:

a world with a green square, a blue square, and a red square

Help Bit follow these instructions:

  • paint green until the green square, then turn right
  • paint blue until the blue square, then turn left
  • paint red until the red square

When Bit is done, the world should look like this:

same world, with a green line, blue line, and red line, each ending at the colored square

Note: the two separate worlds are different sizes, with different distances between the green, blue, and red squares. Make sure that you use while loops in your solution to pass both worlds.

3. Grassy Field

Fill the field with grass! Bit starts in a world like this:

empty 4 by 4 world, bit in the bottom left

When Bit is done, the world should look like this:

4 by 4 world painted all green, bit in the bottom right

Note: the world can be any size.

4. Banner

Bit starts in a world like this:

5 by 6 world with green squares in a v shape at the top, bit in the bottom left

In each column, paint red up to and including the green square.

The solution to this problem is very similar to the solution to Grassy Field. Instead of moving until Bit is blocked, what should Bit do instead?

When Bit is finished, the world should look like this:

all squares below and including the green squares painted red, bit in the bottom right

Note: the second world is a bit larger, and bit should end up painting a staircase rather than a banner.

Manual Grading

Intent The intent of this project is for you to break problems into large pieces and write code that solves worlds of any size.

Grading will be focused on the correct use of concepts learned from Unit 1 as well as decomposition of the problems into separate functions.

If your answers only include one function, you will NOT get full points.

The Quality Code guide page has good examples that may be useful to you as you decide whether to put code in functions or leave it outside a function as glue code.

RubricPoints
Whitespace5
Naming5
Decomposition20
Intent20
Total50

Grading

RubricPoints
y.py25 points
go_gbr.py25 points
grassy_field.py25 points
banner.py25 points
Total100