Today’s Agenda 1.Collect Pre-Lab 3 2.Alice Programming Assignment 3.Built-in Functions 4.Expressions 5.Control Structure 6.Assign pair programming teams.

Slides:



Advertisements
Similar presentations
As you come in…  Sign in (in back) and pick up  Badge  Name Card – write your first name LARGELY on back  Log in:  Launch/Start Alice  Any questions?
Advertisements

Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Alice: A Visual Introduction to Programming First Edition.
1 Fall 2009ACS-1805 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique shown in text) Directed.
Programming: Simple Control Structures Part 1 – Conditional Execution Alice.
While: Indefinite Loops Alice. Repetition In some situations, we don’t know exactly how many times a block of instructions should be repeated. All we.
Fall 2009ACS-1805 Ron McFadyen1 Functions A function is a collection of statement, similar to a method, but a function is defined to return a value to.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall
CS320n –Visual Programming Random Numbers and Random Motion (Slides 6-3) Thanks to Wanda Dann, Steve Cooper, and Susan Rodger for slide ideas.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Fall 2007ACS-1805 Ron McFadyen1 Functions and if-else A function is a collection of statement, similar to a method, but a function is defined to return.
1 Fall 2008ACS-1805 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique) Text presents one of these.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 3 Programming - Putting Together the Pieces.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Recursion Alice. Repetition In some situations, we don’t know exactly how many times a block of instructions should be repeated. All we know is that repetition.
Basic Building Blocks of Programming. Variables and Assignment Think of a variable as an empty container Assignment symbol (=) means putting a value into.
Chapter 8: Introduction to High-level Language Programming Invitation to Computer Science, C++ Version, Third Edition.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 6 Functions & If/Else.
Fall 2007ACS-1805 Ron McFadyen1 Chapter 3 Programming.
Programming: Simple Control Structures Alice. Control Statements We have been using Do in order and Do together to control the way instructions are executed.
Today’s Agenda 1.Collect Pre-Lab 4 2.Alice Programming Assignment Storyboards 3.Classes 4.Objects 5.Methods 6.Assign pair programming teams and meet upstairs.
Computer Science Lego Robotics Lab 07 Page 51. CS Lego Robotics Lab 07 (Updated ) Objectives: 1.Extend the Lego robot with three sensors. 2.Program.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
The Logical Structure of Algorithms. Algorithms Steps necessary to complete a task or solve a problem. Example: Recipe for baking a cake –Will contain.
Today’s Agenda 1.Collect Pre-Lab 5 2.Collect Alice project storyboards 3.Events 4.Dummy Objects 5.Assign pair programming teams and meet upstairs for Lab.
Programming: Simple Control Structures Alice. Control Statements We have been using Do in order and Do together to control the way instructions are executed.
Teaching a character to walk in more than one world: Parameters and Inheritance. By Lana Dyck under the direction of Professor Susan Rodger Duke University.
Four Fundamental Pieces Instruction Control Structure Function Expression.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5: Algorithms Computer Science: An Overview Tenth Edition by J. Glenn.
1 09/20/04CS150 Introduction to Computer Science 1 Let ’ s all Repeat Together.
1 Fall 2007ACS-1903 Techniques for designing code Storyboards Text (aka pseudocode) Diagrams Flowcharts (a procedural technique) Text presents one of these.
Programming: Simple Control Structures Part 2 – Repetition Alice.
Mathematical Expressions, Conditional Statements, Control Structures
Programming: Putting Together the Pieces Built-in Questions and Expressions Alice.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Functions Sec 8-11 Web Design. Objectives The Student will: Understand what a function is Know the difference between a method and a function Be able.
Programming: Simple Control Structures
Programming: Simple Control Structures MMP 220 Multimedia Programming This adapted material was prepared for students in MMP220 as as part of a curriculum.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Obj: Programming: Simple Control Structures HW: Read section 3 – 2 AC3 D2 Do Now: 1.Log on to Alice. Open the file firstEncounter.a2w located in the folder.
Programming: Simple Control Structures Sec 46 Web Design.
CompSci 4 Chap 4 Sec 3 Sept 23, 2010 Prof. Susan Rodger.
Today’s Agenda 1.Collect Pre-Labs 2.Software engineering (CS 480) –Heavyweight approaches –Agile methods Extreme programming –Pair programming »PairDrawing.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-1 Lecture Objectives To understand: –what values can be stored in a Boolean.
Programming: Putting Together the Pieces Built-in Functions and Expressions Sec 8-5 Web Design.
Obj: to recognize built-in functions and expressions HW: Read Section 3.1 and do HW4 Edmodo article due Sunday at 8pm Edmodo feedback due 8pm 10/17 Do.
Programming: Putting Together the Pieces Built-in Functions and Expressions Sec 8-5 Web Design.
Programming: Simple Control Structures
Putting Objects in Motion
Programming: Simple Control Structures
Recursion Alice.
Simple Control Structures
Control Structures
TOPICS: HOW TO MAKE THE SHERIFF SHOOT A GUN.
Recursion Alice.
Programming: Simple Control Structures
3-3 Side Effects A side effect is an action that results from the evaluation of an expression. For example, in an assignment, C first evaluates the expression.
Programming: Simple Control Structures
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Computer Science — An Overview J. Glenn Brookshear
Programming: Simple Control Structures
Programming: Simple Control Structures
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Programming: Simple Control Structures
Programming: Simple Control Structures
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Programming: Putting Together the Pieces Built-in Functions and Expressions Alice.
Presentation transcript:

Today’s Agenda 1.Collect Pre-Lab 3 2.Alice Programming Assignment 3.Built-in Functions 4.Expressions 5.Control Structure 6.Assign pair programming teams and meet upstairs for Lab 3

Explore the Possibilities CS 112: Foundations of Computer Science Control & Functions Putting the pieces together

Putting together the pieces A major part of learning how to program is figuring out how to put the pieces together that compose a program.

Four Pieces Instructions –A statement that executes on the computer Control Structures –Do in order (sequential) –Do together (parallel) Functions Expressions

Alice Built-in Functions A function computes a value or asks a question –What is King Tut’s distance to Cleopatra? –Is the mummy taller than King Tut?

Control Structures Do in order Do together Conditional – if/else Repetition –Loop –while

pseudocode

Do the mummy walk Do in order –Do together Mummy move forward ¼ meter Do in order –mummy’s left leg turn backward 0.1 revolutions –mummy’s left leg turn forward 0.1 revolutions –Do together mummy move forward ¼ meter Do in order –mummy’s right leg turn backward 0.1 revolutions –mummy’s right leg turn forward 0.1 revolutions

Today’s Summary 1.Alice Programming Assignment 2.Built-in Functions 3.Expressions (+ - * /) 4.Control Structure (if/else, loop, while) 5.Assign pair programming teams and meet upstairs for Lab 3