CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 5: Difference Between Dates Case Study.

Slides:



Advertisements
Similar presentations
A number of MATLAB statements that allow us to control the order in which statements are executed in a program. There are two broad categories of control.
Advertisements

Lecture 12 Recursion part 1
COMPUTER PROGRAMMING I Understand Problem Solving Tools to Design Programming Solutions.
New Mexico Computer Science For All Decomposition in Computer Programming Maureen Psaila-Dombrowski.
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
A problem with functions: arguments must always have values that can be worked out Whenever we call a function we give it arguments. Lisp then works out.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 4: Review Conditional & Word Stuff.
Al-Karma Language School Computer Department Prep. 3.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 17: HOF and Tick-Tack-Toe.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 18: HOF.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 26: Printing and Stuff.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 14: Number Spelling Mini-project.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 12: Homework stuff and Accumulating Recursion.
Things to look forward to… There is a quiz coming up. – On what I’m about to show you Presentations remaining – Kevin – Richard – Colleen – Michael Drop.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 19: HOF Problems.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 6: Mini-Project Prep.
CS3: Introduction to Symbolic Programming Spring 2006Nate Titterton Lecture 4: "Difference Between Dates" and data abstraction.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 13: Bugs and Two Stage Recursion.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 20: Tree Recursion.
Algorithm Design CS105. Problem Solving Algorithm: set of unambiguous instructions to solve a problem – Breaking down a problem into a set of sub- problems.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 1: Introduction & Administration.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 11: Accumulating Recursion.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 8: Recursion.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 9: Recursion Rocks!
Midterm Logistics Where? 2050 VLSB When? Monday, 4:10 to 5:40 What to do? –“Review problems” from Thursday/Friday in UCWise. –Two practice exams and solutions.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 2: Review – Writing Procedures.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 16: Let and Lambda.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 25: Trees and Generalized Lists.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 27: Review – most children and truth about cons.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 7: Review.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 15: Procedures as Arguments.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 24: Review for lists, map and member.
CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 3: Conditional Expressions.
Imagine your school is having a Summer Fair. Children have been divided into groups to make and sell their products.
The Logical Structure of Algorithms. Algorithms Steps necessary to complete a task or solve a problem. Example: Recipe for baking a cake –Will contain.
Stage 9: Relay Programming. Objectives Practice communicating ideas through codes and symbols Use teamwork to complete a task Verify the work of their.
COSC 235: Programming and Problem Solving Chapter 3: Arithmetic vs Numerics Instructor: Dr. X 1.
Chapter 1: Test Your Proficiency Directions: Select a section to work on. Work out each problem on a piece of paper. Click to check your answer. For detailed.
BIT 115: Introduction To Programming Instructor: Jon Peck
Introduction to Method. Example Java Method ( 1 ) The 2 types (kinds) of methods in Java Class methods Instance methods Methods can do more work than.
Today’s Agenda…10-5 Bellringer: What is mass? Turn in Letters Notes on Law of Conservation of Mass Chapter Review.
Inequalities Symbols and line graphs. Symbols  < is less than  > is greater than  < is less than or equal to  > is greater than or equal to points.
Computer Programming I Summer 2011
Warm-Up Draw a number line for both problems and solve. 1.) = 2.) = Use the same paper as yesterday!
Bell Work8/19/14 Evaluate each expression for the replacement set.
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
BIT 115: Introduction To Programming Professor: Dr. Baba Kofi Weusijana (say Doc-tor Way-oo-see-jah-nah, Doc-tor, or Bah-bah)
Definitions of the Day (DODs) 4.2a – Solving Equations Variable on one side Inverse Operation Variable Expression Equation.
2/20/08 BR: What are the possible dates for the Mock Trial Competition Today: Continuing With Yesterday’s Work.
Bell Work8/18/14 Simplify. Yesterday’s Homework 1.Any questions? 2.Please pass your homework to the front. Make sure the correct heading is on your paper.
Solving Systems by Substitution (isolated) 3/16/2016 Objective: solve a linear system by substitution when a term is already isolated. Students will solve.
Building and Solving Equations 2Projector Resources Building and Solving Equations Projector Resources.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Understand Problem Solving Tools to Design Programming Solutions
Evaluating Statements about Radicals
CS 326 Programming Languages, Concepts and Implementation
CS1001 Programming Fundamentals 3(3-0) Lecture 2
Understand Problem Solving Tools to Design Programming Solutions
Series of Paragraphs Expressing an Opinion
EGR 141 Computer Problem Solving in Engineering and Computer Science
Problem Solving and Algorithm Design
What is an equation? An equation is a mathematical statement that two expressions are equal. For example, = 7 is an equation. Note: An equation.
Rules of evaluation The value of a number is itself.
Creative Project Revised 3/02
Unit 1: Principles of Computer Science
Created for CVCA Physics
CS105 Introduction to Computer Concepts Intro to programming
Warm-Up Problems Unit 0.
WRITING AN ALGORITHM, PSEUDOCODE, AND FLOWCHART LESSON 2.
CIS 110: Introduction to Computer Programming
Presentation transcript:

CS3L: Introduction to Symbolic Programming Summer 2008Colleen Lewis Lecture 5: Difference Between Dates Case Study

Today Helper Procedures Review Conditionals Difference Between Dates

Helper Procedures From Yesterday’s Lecture: Bake a cake Make the batter Bake the cake Ice the cake Today – Build the house Work with a partner on one piece of paper.. Make a high-level plan (with 2-4 helper monkeys) Make a slightly lower-level plan for each helper monkey Turn it in!

Predicates (define (valid-date? day month year) (cond ((or ( day 31) ( month 12) (<= year 1582)) #f) ((= day 31) (member? month '( ))) … I

IF & COND Statements return expressions can do “thinking” (if ) (cond (predicate1return_expression1) (predicate2return_expression2) (else return_expression3))

Important Parts of Difference Between Dates Sometime solving it by hand is different than in a computer Check helper programs to make sure they work!!!! Don’t propogate errors! Divide and Conquer Throw out code! Pseudo-code