Let's Play "What's the Question"

Slides:



Advertisements
Similar presentations
CSC 270 Nov. 22, 2005 Last Day of Scheme Dr. Stephen Bloch
Advertisements

Higher-Order Functions and Loops c. Kathi Fisler,
1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
Lab1 Lab 1: CSG 711: Programming to Structure Karl Lieberherr.
1 Programming Languages (CS 550) Lecture Summary Functional Programming and Operational Semantics for Scheme Jeremy R. Johnson.
Natural Numbers or, "All you ever need is compounds, variants, and recursion".
The Function Design Recipe CS 5010 Program Design Paradigms “Bootcamp” Lesson 1.1 TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
CS 355 – PROGRAMMING LANGUAGES Dr. X. Apply-to-all A functional form that takes a single function as a parameter and yields a list of values obtained.
Multi-way Trees CS 5010 Program Design Paradigms “Bootcamp” Lesson 6.6 © Mitchell Wand, This work is licensed under a Creative Commons Attribution-NonCommercial.
Loops in Scheme, II c. Kathi Fisler, 2001 (early slides assume map/filter)
Section 4.4: Designing Conditional Functions. REVIEW: Design Recipe – V. 2  Figure out precisely what you need to do. 1. Understand the problem 2. Function.
© 2004 Pearson Addison-Wesley. All rights reserved5-1 Iterations/ Loops The while Statement Other Repetition Statements.
Mutually-Recursive Data Definitions CS 5010 Program Design Paradigms “Bootcamp” Lesson 6.4 © Mitchell Wand, This work is licensed under a Creative.
Lists of Lists CS 5010 Program Design Paradigms “Bootcamp” Lesson © Mitchell Wand, This work is licensed under a Creative Commons Attribution-NonCommercial.
Local Definitions, Scope, Functional Abstraction, and Polymorphism.
Arbitrarily Long Data Structures: Lists and Recursion CMSC Introduction to Computer Programming October 4, 2002.
The Function Design Recipe CS 5010 Program Design Paradigms “Bootcamp” Lesson 1.1 TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
TeachScheme, ReachJava Adelphi University Tuesday afternoon July 13, 2010.
Scheme: Compound Data Chapter 6 of HTDP Ms. Knudtzon September 19.
Functional Programming in Scheme and Lisp. Overview In a functional programming language, functions are first class objects. You can create them, put.
Functional Programming and Lisp. Overview In a functional programming language, functions are first class objects. In a functional programming language,
TeachScheme, ReachJava Adelphi University Wednesday morning June 24, 2008.
CSC 160 Computer Programming for Non-Majors Chapter 8: Scheme Language Review Prof. Adam M. Wittenstein
5 BASIC CONCEPTS OF ANY PROGRAMMING LANGUAGE Let’s get started …
Computer Engineering Rabie A. Ramadan Lecture 5.
Introduction to Computer Programming
Functional Programming Language 1 Scheme Language: part 2.
Cs1321 December 6, 2001 Review. What is computer science? What's an algorithm? Processes and programs Overview of some programming language concepts Functional.
Modular Programming – User Defined Functions. CSCE 1062 Outline  Modular programming – user defined functions  Value returning functions  return statement.
Lecture on Set! And Local CS 2135 Copyright Kathi Fisler, 2002 This material requires Advanced Language Level.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Using the List Template CS 5010 Program Design Paradigms “Bootcamp” Lesson TexPoint fonts used in EMF. Read the TexPoint manual before you delete.
Using the List Template CS 5010 Program Design Paradigms “Bootcamp” Lesson 4.2 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this.
Algorithms and Pseudocode
CSE 425: Functional Programming I Programs as Functions Some programs act like mathematical functions –Associate a set of input values from the function’s.
Category Name $100100$100100$100100$ $200200$200200$200200$ $300300$300300$300300$ $400400$400400$400400$ $ Category Name.
Functional Programming Language 1 Scheme Language: part 3.
Syntax and Semantics. Today's Lecture Compounds: Templates, Templates, … Syntax The acceptable form of what we write Mathematically, a set Mr. Backus.
Functional Programming Languages
Topic: Python’s building blocks -> Variables, Values, and Types
CS 5010 Program Design Paradigms “Bootcamp” Lesson 5.2
CS 5010 Program Design Paradigms “Bootcamp” Lesson 3.1
Representing Sets (2.3.3) Huffman Encoding Trees (2.3.4)
7 - Programming 7P, Q, R - Testing.
More Recursive Data Types
Intro To Classes Review
CS 326 Programming Languages, Concepts and Implementation
CS 5010 Program Design Paradigms “Bootcamp” Lesson 6.2
CS 5010 Program Design Paradigms “Bootcamp” Lesson 5.3
September 4, 1997 Programming Languages (CS 550) Lecture 6 Summary Operational Semantics of Scheme using Substitution Jeremy R. Johnson TexPoint fonts.
CS 5010 Program Design Paradigms “Bootcamp” Lesson 5.1
Organization of Programming Languages
Chapter 10 Programming Fundamentals with JavaScript
CS 5010 Program Design Paradigms “Bootcamp” Lesson 7.5
Program Design Introduction to Computer Programming By:
Introduction to pseudocode
The Metacircular Evaluator
The Metacircular Evaluator
(early slides assume map/filter)
Chapter 6: Repetition Statements
The Metacircular Evaluator (Continued)
This is a template for you to use in your classroom.
Streams, Delayed Evaluation and a Normal Order Interpreter
CS 5010 Program Design Paradigms “Bootcamp” Lesson 6.5
6.001 SICP Variations on a Scheme
6.001 SICP Interpretation Parts of an interpreter
Introduction to Python
General Computer Science for Engineers CISC 106 Lecture 03
CS 5010 Program Design Paradigms “Bootcamp” Lesson 4.1
Bringing it all Together: Family Trees
Presentation transcript:

Let's Play "What's the Question" Remember each question will be in the form of an answer and you must respond with a question. GOOD LUCK Here are the categories

Scheme Terms

The Design Recipe

Compound Data

And The Answer Is…

Errors

Templates

Scheme Terms The Design Recipe Compound Data And The Answer Is… Errors Templates $100 $100 $100 $100 $100 $100 $200 $200 $200 $200 $200 $200 $300 $300 $300 $300 $300 $300 $400 $400 $400 $400 $400 $400 $500 $500 $500 $500 $500 $500

Syntax is to computer languages as this is to English. $100

What is grammar? $100

cond, else, and define $200

What are keywords? $200

Refers to the meaning of programs. $300

What is semantics? $300

( + x 5 ) is an example of this. $400

What is an expression? $400

Variables that follow the first variable in the header? $500

What are parameters? $500

(define (f x) …) is an example of this. $100

What is a header? $100

Provides the name of the function as well as its input and output data types. $200

What is a contract? $200

The last step of the design recipe. $300

What is running the tests? $300

For a function involving compound data, this is the first step. $400

What is data definition? $400

This step provides an opportunity to think through the computational process of a function. $500

What are examples? $500

make-boa is an example of this. $100

What is a constructor? $100

A selector for the following structure (define-struct dillo (weight alive?)) $200

What is dillo-weight or dillo-alive? ? $200

(cons ‘Bob (cons ‘John empty))) is an example of this. $300

What is a list of symbols? $300

Daily Double

symbol? is an example of this. $400

What is a predicate? $400

These are actually selectors for lists. $500

What are first and rest? $500

(number? (make-posn 2 3 )) $100

What is false? $100

(first (cons 10 (cons 20 (cons 30 empty)))) $200

What is 10? $200

The value of (cond. [(< x 5) ‘RED]. [(> x 5) ‘BLUE] The value of (cond [(< x 5) ‘RED] [(> x 5) ‘BLUE] [else ‘GREEN]) when x = 3 $300

What is ‘RED? $300

Value of Y given the following: (define X 4) (define Y ( * 2 X)) $400

What is 8? $400

(rest (rest (cons 10 (cons 20 (cons 30 empty))))) $500

What is (cons 30 empty)? $500

(define (f) x (+ x 1)) generates this type of error. $100

What is syntax error? $100

empty? (L) generates an error. Give the corrected code. $200

What is (empty? L) ? $200

Type of error in the following: (define (f x) ( / x 0)) $300

What is a run-time error? $300

(draw-solid-disk make-posn (100 100) 50 ‘blue) produces an error (draw-solid-disk make-posn (100 100) 50 ‘blue) produces an error. Describe the cause of this error. $400

What is misplaced parenthesis? $400

A program that never ends has this. $500

What is an infinite loop? $500

Number of cond lines needed in a function that consumes an animal that is either a boa, dillo or ant. $100

What is three? $100

A template for a function consuming this data type should include constructors, selectors and predicates. $200

What is a structure? $200

first and rest appear in templates for this data type. $300

What are lists? $300

The template for this date type is self-referential. $400

What is a list? $400

Used in templates for functions consuming mixed data types, this type of operator determines what type of data is being processed. $500

What is a predicate? $500

Final Game Question Purpose of Function

The purpose of the function, f1 (define (f1 lon). (cond. [(empty The purpose of the function, f1 (define (f1 lon) (cond [(empty? lon) 0] [else (+ (first lon) (f1 (rest lon))]))

What is “To determine the sum of a list of numbers”?

And the winner is…..