Lab 2 – Tuesday, August 31, 2021

Topic: Constants

Description: This lab session will expand on sequential programming where your team will program your Lego robot vehicle to draw a square and a block figure 8.

Components:
  1. Go to Units and select Robot Trainer. Complete the Moves and Turns tutorial.
  2. Program the robot to go forward and then make a 90 degree turn. I recommend you use trial and error to get the turn close. Getting it perfect is not required, but you can work towards that if you wish outside of laboratory time.
  3. Add constants for the length of the side and the turn. Change your program to use these constants.
  4. Add additional statements (using your constants) to complete your square.
  5. Add a second square (starting where you finished) to create a block figure 8.
Extra Credit:
  1. Create a second program that “writes” out a single block letter of your team’s choice (just not B since it will look like the figure 8). Make sure to comment this code appropriately so a different user will understand what is being done.
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine