Presentation is loading. Please wait.

Presentation is loading. Please wait.

CMPUT 101 Lab #2 Section: D12 September 18, 2008 Fraser Anderson.

Similar presentations


Presentation on theme: "CMPUT 101 Lab #2 Section: D12 September 18, 2008 Fraser Anderson."— Presentation transcript:

1 CMPUT 101 Lab #2 Section: D12 September 18, 2008 Fraser Anderson

2 Overview Future presentations Programming concept review Motivation ▫Beeper bots ▫This lab Lab 2 info + demo instructions

3 Future Presentations Labs are here to increase understanding I don’t know what isn’t clearly explained in lectures Email me with concepts that you would like re- iterated, things that were confusing, questions you may have, etc. frasera@cs.ualberta.ca

4 Programming review: if General form of a“conditional branch” If ( ) { ▫ } Example: Drop a single beeper, if you have one If (have_beeper) { ▫putbeeper }

5 Programming review: Iteration I General form of iteration do ( ) { ▫ } Example: Drop 5 beepers in a row do (5) { ▫putbeeper ▫move }

6 Programming review: Iteration II General form: while ( ) { ▫ } Example: Move forward until you hit a wall while (front_is_clear) { ▫move }

7 Motivation: Beeper bots Teach how modern software works Learn a general programming language which is very similar to current languages in use. (ie: C++, Java, Python) Why not use those languages? ▫Steeper learning curve (can’t just click ‘Run’) ▫More difficult debugging

8 Motivation: Lab 2 Understand programming concepts (subroutines, conditionals, loops) Solve complex problems using computers Real application: ▫http://www.youtube.com/watch?v=uUGaerLDBQ M

9 Lab 2 Read Lab 2 presentation notes for hints on how to do parts a – d You may work in groups of 2, both people should understand and be able to explain the program. Parts a – c will make part d much easier.

10 Demonstrate Only part D The exact same program must work on multiple worlds. Please download the following worlds for testing: ▫http://www.cs.ualberta.ca/~frasera/lab2a.txthttp://www.cs.ualberta.ca/~frasera/lab2a.txt ▫http://www.cs.ualberta.ca/~frasera/lab2b.txthttp://www.cs.ualberta.ca/~frasera/lab2b.txt The end!


Download ppt "CMPUT 101 Lab #2 Section: D12 September 18, 2008 Fraser Anderson."

Similar presentations


Ads by Google