lab3 - ◦ Use if statements ◦ Use while loops ◦...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CMSC 143: Introduction to Object-Oriented Programming with Robots Lab 3: Programmable Behavior Due September 20, 2010 Chapter 6 of the textbook discusses ways to make your robot exhibit different types of behavior. In this lab you are asked to implement three of the four behaviors listed below. You should work in teams of two peo- ple, but each person should submit a copy of the program. You should work together on each behavior. Each behavior should be programmed as a function that runs for 60 seconds. You can use the currentTime() function as often as you would like, but you can use the timeRemaining() function only once. Each team member should submit a copy of your python program (cmsc143 lab3 NAME.py) on moodle. Your program should have your name(s), email(s), and the date at the top of the file as a comment. Learning Objectives Create robot behaviors.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ◦ Use if statements. ◦ Use while loops. ◦ Program in pairs. Behaviors (pick three) 1. lightSeeker() Create a robot behavior that runs toward the light. 2. avoid() Create a robot behavior that runs away from obstacles triggering the infrared detectors. 3. securityGuard() Do you have a feeling your roommate is snooping through your desk drawer? Write a program that detects if the drawer is opened and takes and saves a picture of the offender and then beeps loudly. 4. digitalCamera() Write a function that takes and displays a picture when the light sensor is pressed. The left light sensor should take a color picture ( takePicture() ) and the right sensor should take a gray-scale picture ( takePicture(’gray’) ). Feel free to say “Cheese” before snapping the picture. CMSC 143 (Fall 2010): Lab 3 1 of 1...
View Full Document

This note was uploaded on 10/14/2010 for the course CMSC 143 taught by Professor Keitho'hara during the Spring '10 term at Bard College.

Ask a homework question - tutors are online