Section #1: A Bit of Fun

June 22nd, 2021


Written by Juliette Woodrow and Tara Jones

This week in section, your first priority is to meet your section leader and discover what sections in CS106A are all about. Your section leader will therefore spend the first part of this week’s session on introductions and telling you the things you need to know, such as how to sign up for interactive grading. Afterwards, they will move on to cover some of the important material from class in a setting that is small enough for you to go over practice problems and ask questions. This week, your goal is to gain familiarity with bit and the experimental server.

Reverse Santa

In this problem, your goal is to help bit get up a chimney! Use the bit syntax from lecture to help solve this world! Move bit forward until an open square appears above - the chimney! Move bit up the chimney until an open square appears to the right. Move bit to that square.

Reverse Santa Code

Here is an example run of the function:

Start:

Bit at the left corner or the corridor


End:

Bit at the top of the chimney, one square to the right, facing right


Standard Santa

In this problem your job is to define a function to help Bit get down a chimney! Bit/Santa is on the roof, facing the left side of the world. Move bit forward until an opening appears below - the chimney. Move bit down the chimney (into the house) until blocked. Turn right at the bottom, and move until blocked. Paint green all the squares bit occupies in the house.

Standard Santa Code

Here is an example run of the function:

Start:

Bit at square to the right of top of chimeny, facing left


End:

Bit at the bottom left of the corridor, with the path painted green.


Holes

Bit has a wall at its back and is facing into a hole that is 1 or more squares deep. Move bit forward until blocked, painting every moved-to square blue. This will fill the hole with blue. Then return to the original location and facing.

Holes Code

Here is an example run of the function:

Start:

An orange poppy


End:

An upside down poppy flower with a 50 pixel magenta border on the left and right side of the image.


i