Note on Program Design Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming:

Slides:



Advertisements
Similar presentations
CS 221 Chapter 2 Excel. In Excel: A1 = 95 A2 = 95 A3 = 80 A4 = 0 =IF(A1
Advertisements

1 CS 162 Introduction to Computer Science Chapter 2 Introduction Herbert G. Mayer, PSU Status 11/9/2014.
© 2010 Pearson Education, Inc. All rights reserved.
CHAPTER 7-1 SOLVING SYSTEM OF EQUATIONS. WARM UP  Graph the following linear functions:  Y = 2x + 2  Y = 1/2x – 3  Y = -x - 1.
COSC 235: Programming and Problem Solving Chapter 1: The magic of Python Instructor: Dr. X 1.
COSC 235: Programming and Problem Solving Chapter 3: Arithmetic vs Numerics Instructor: Dr. X 1.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 6-7 John D. Carpinelli.
COSC 235: Programming and Problem Solving Ch. 2: Your first programs!!! Instructor: Dr. X.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 1-5 John D. Carpinelli.
1 10/15/04CS150 Introduction to Computer Science 1 Reading from and Writing to Files Part 2.
1. COMPUTERS AND PROGRAMS Rocky K. C. Chang September 6, 2015 (Adapted from John Zelle’s slides)
Essential Cell Biology Third Edition Chapter 1 Introduction to Cells Copyright © Garland Science 2010.
Slides for CISC 2315: Discrete Structures Chapters CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Fall 2007 Slides created by James.
Data Structures Dr. Abd El-Aziz Ahmed Assistant Professor Institute of Statistical Studies and Research, Cairo University Springer 2015 DS.
Recitation 2: Merge and Quick Sort Işıl Karabey
ICS 3UI - Introduction to Computer Science
Topic: Programming Languages and their Evolution + Intro to Scratch
IST256 : Applications Programming for Information Systems
6-3 Solving Quadratic Equations by Factoring
CS190/295 Programming in Python for Life Sciences: Lecture 1
CS-1004 — Introduction to Programming for Non-Majors
Prof. Carolina Ruiz Department of Computer Science
Relations and Functions
Final Project Details Note: To print these slides in grayscale (e.g., on a laser printer), first change the Theme Background to “Style 1” (i.e., dark.
First Python Program Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An.
David S. Moore • George P. McCabe Practice of Statistics
Chapter 1: Introduction
4. sequence data type Rocky K. C. Chang 16 September 2018
نجاح وفشل المنشآت الصغيرة
Consolidation and Review
Decision Structures and Indefinite Loops
Introduction to Dictionaries
Symbolic Constants in C
Programming Assignment #6
Accessing Files in C Professor Hugh C. Lauer CS-2303, System Programming Concepts (Slides include materials from The C Programming Language, 2nd edition,
Programming Assignment #5
Homework #5 — Monte Carlo Simulation
Elements of a Python Program
More About Functions Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An.
Variables, Lists, and Objects
Debuggers and Debugging
Simple Graphics Package
Objects (again) Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An Introduction.
More elements of Python programs
Notes on pyplot Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An Introduction.
Notes about Homework #4 Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming:
CSV files Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An Introduction.
Lab Project #1: Datalab Assigned March 12, 2012; due March 22, 11:59 PM Professor Hugh C. Lauer CS-2011, Machine Organization and Assembly Language.
Notes on Homework #6 Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An.
Bellwork 1/24 Solve #1 and then do #2 1.) x + y = 5 2.) 3x + 2y = 12
The University of Adelaide, School of Computer Science
Strings, Lists, and Files
Windows Installation Tutorial
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Introduction to Computer Science
Skills Check Multiplying and Binomial Expansion
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Section 1 – Solving Systems of Equations in Two Variables
Computer Science Discoveries Unit 1 Chapter 2 Lesson 5
Numpy, pylab, matplotlib (follow-up)
The University of Adelaide, School of Computer Science
The University of Adelaide, School of Computer Science
Intersection Method of Solution
Chapter 3 Lessons 3, 4 and 5 Vocabulary Quiz.
For Friday Read chapter 9, sections 2-3 No homework
Prof. Carolina Ruiz Department of Computer Science
Presentation transcript:

Note on Program Design Professor Hugh C. Lauer CS-1004 — Introduction to Programming for Non-Majors (Slides include materials from Python Programming: An Introduction to Computer Science, 2nd edition, by John Zelle and copyright notes by Prof. George Heineman of Worcester Polytechnic Institute) CS-1004, A-Term 2014 Note on Program Design

From Chapter 2 §2.1 – p. 28 Analyze the Problem Specifications Exactly what problem are you trying to solve In detail Specifications What your program will do Not how it does it, but what it accomplishes Create Design For your program How your program works Test and Debug Nobody gets it right the first time Maintain the program Programs usually evolve and adapt CS-1004, A-Term 2014 Note on Program Design

Called “Top-down Design” CS-1004, A-Term 2014 Note on Program Design

Other ways to think about problem What kind of data is needed to get desired result? Working backwards … … how to get that data together … and then work backwards from there … Etc. CS-1004, A-Term 2014 Note on Program Design

Example — Homework #5 What was required output? A: Graphs of #s of games versus #s of throw What function can produce that output? A: pyplot.plot() What arguments does pyplot.plot() need to produce that output? A: Lists Specifically, lists of numbers of games indexed by numbers of throws I.e., list position indicates number of throws List value indicates number of games ending in that number of throws Now we are in position to start to design program! Working backwards from end result! CS-1004, A-Term 2014 Note on Program Design

Questions? Comments? CS-1004, A-Term 2014 Note on Program Design