Download presentation
Presentation is loading. Please wait.
Published byDwight Gilmore Modified over 9 years ago
1
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
2
Explore the Possibilities CS 112: Foundations of Computer Science Control & Functions Putting the pieces together
3
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.
4
Four Pieces Instructions –A statement that executes on the computer Control Structures –Do in order (sequential) –Do together (parallel) Functions Expressions
5
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?
6
Control Structures Do in order Do together Conditional – if/else Repetition –Loop –while
7
pseudocode
8
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
9
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.