robot-brains-2

robot-brains-2 - CMSC 143 RobotBrains Keith OHara...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Sep 6 2010 CMSC143 - O'Hara 1 CMSC 143   Robot Brains Keith O’Hara [email protected] http://xkcd.com/695/
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sep 6 2010 CMSC143 - O'Hara 2 Announcements Lab 1 due 11:55 pm (9/6/2010) Assignment 1 – Sing and Dance due Sep 15th
Background image of page 2
Sep 6 2010 CMSC143 - O'Hara 3 Python and IDLE IDLE Tips Always use StartPython.py icon Ctrl-C to stop program Use up/down arrows and then <enter> to copy/paste old statements
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sep 6 2010 CMSC143 - O'Hara 4 Python Tips Debugging Tips Use comments to document your code! Comments are text that aren’t interpreted by python #comments start with the number sign Multi-line comments start and end with three quotes ””” Try to use error messages when you can Case matters in general “a” is not “A” White space often matters “abc” is not always the same as “a b c”
Background image of page 4
Sep 6 2010 CMSC143 - O'Hara 5 Using Simple Functions forward(1) stop() beep(1, 440) Functions that interact with the robot forward (speed) stop() beep(time, frequency) Pass them arguments Execute in sequential order flow of execution Top-level not in any function
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the 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.

Page1 / 17

robot-brains-2 - CMSC 143 RobotBrains Keith OHara...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online