Python Programming: An Introduction to Computer Science
|
|
- Grant Sharp
- 5 years ago
- Views:
Transcription
1 Pytho Programmig: A Itroductio to Computer Sciece Chapter 1 Computers ad Programs 1
2 Objectives To uderstad the respective roles of hardware ad software i a computig system. To lear what computer scietists study ad the techiques that they use. To uderstad the basic desig of a moder computer. 2
3 Objectives (cot.) To uderstad the form ad fuctio of computer programmig laguages. To begi usig the Pytho programmig laguage. To lear about chaotic models ad their implicatios for computig. 3
4 The Uiversal Machie A moder computer ca be defied as a machie that stores ad maipulates iformatio uder the cotrol of a chageable program. Two key elemets: Computers are devices for maipulatig iformatio. Computers operate uder the cotrol of a chageable program. 4
5 The Uiversal Machie What is a computer program? A detailed, step-by-step set of istructios tellig a computer what to do. If we chage the program, the computer performs a differet set of actios or a differet task. The machie stays the same, but the program chages! 5
6 The Uiversal Machie Programs are executed, or carried out. All computers have the same power, with suitable programmig, i.e. each computer ca do the thigs ay other computer ca do. 6
7 Program Power Software (programs) rule the hardware (the physical machie). The process of creatig this software is called programmig. Why lear to program? Fudametal part of computer sciece Havig a uderstadig of programmig helps you have a uderstadig of the stregths ad limitatios of computers. 7
8 Program Power Helps you become a more itelliget user of computers It ca be fu! Form of expressio Helps the developmet of problem solvig skills, especially i aalyzig complex systems by reducig them to iteractios betwee simpler systems. Programmers are i great demad! 8
9 What is Computer Sciece? It is ot the study of computers! Computers are to computer sciece what telescopes are to astroomy. E. Dijkstra The questio becomes, What processes ca be described? This questio is really, What ca be computed? 9
10 What is Computer Sciece? Desig Oe way to show a particular problem ca be solved is to actually desig a solutio. This is doe by developig a algorithm, a step-by-step process for achievig the desired result. Oe problem it ca oly aswer i the positive. You ca t prove a egative! 10
11 What is Computer Sciece? Aalysis Aalysis is the process of examiig algorithms ad problems mathematically. Some seemigly simple problems are ot solvable by ay algorithm. These problems are said to be usolvable. Problems ca be itractable if they would take too log or take too much memory to be of practical value. 11
12 What is Computer Sciece? Experimetatio Some problems are too complex for aalysis. Implemet a system ad the study its behavior. 12
13 Hardware Basics The cetral processig uit (CPU) is the brai of a computer. The CPU carries out all the basic operatios o the data. Examples: simple arithmetic operatios, testig to see if two umbers are equal. 13
14 Hardware Basics Memory stores programs ad data. CPU ca oly directly access iformatio stored i mai memory (RAM or Radom Access Memory). Mai memory is fast, but volatile, i.e. whe the power is iterrupted, the cotets of memory are lost. Secodary memory provides more permaet storage: magetic (hard drive, floppy), optical (CD, DVD) 14
15 Hardware Basics Iput devices Iformatio is passed to the computer through keyboards, mice, etc. Output devices Processed iformatio is preseted to the user through the moitor, priter, etc. 15
16 Hardware Basics Fetch-Execute Cycle First istructio retrieved from memory Decode the istructio to see what it represets Appropriate actio carried out. Next istructio fetched, decoded, ad executed. Lather, rise, repeat! 16
17 Programmig Laguages Natural laguage has ambiguity ad imprecisio problems whe used to describe complex algorithms. Programs expressed i a uambiguous, precise way usig programmig laguages. Every structure i programmig laguage has a precise form, called its sytax Every structure i programmig laguage has a precise meaig, called its sematics. 17
18 Programmig Laguages Programmig laguage like a code for writig the istructios the computer will follow. Programmers will ofte refer to their program as computer code. Process of writig a algorithm i a programmig laguage ofte called codig. 18
19 Programmig Laguages High-level computer laguages Desiged to be used ad uderstood by humas Low-level laguage Computer hardware ca oly uderstad a very low level laguage kow as machie laguage 19
20 Programmig Laguages Add two umbers: Load the umber from memory locatio 2001 ito the CPU Load the umber from memory locatio 2002 ito the CPU Add the two umbers i the CPU Store the result ito locatio 2003 I reality, these low-level istructios are represeted i biary (1 s ad 0 s) 20
21 Programmig Laguages High-level laguage c = a + b This eeds to be traslated ito machie laguage that the computer ca execute. Compilers covert programs writte i a high-level laguage ito the machie laguage of some computer. 21
22 Programmig Laguages Iterpreters simulate a computer that uderstads a high-level laguage. The source program is ot traslated ito machie laguage all at oce. A iterpreter aalyzes ad executes the source code istructio by istructio. 22
23 Programmig Laguages Compilig vs. Iterpretig Oce program is compiled, it ca be executed over ad over without the source code or compiler. If it is iterpreted, the source code ad iterpreter are eeded each time the program rus Compiled programs geerally ru faster sice the traslatio of the source code happes oly oce. 23
24 Programmig Laguages Iterpreted laguages are part of a more flexible programmig eviromet sice they ca be developed ad ru iteractively Iterpreted programs are more portable, meaig the executable code produced from a compiler for a Petium wo t ru o a Mac, without recompilig. If a suitable iterpreter already exists, the iterpreted code ca be ru with o modificatios. 24
25 The Magic of Pytho Whe you start Pytho, you will see somethig like: Pytho (r312:79149, Mar , 00:41:52) [MSC v bit (Itel)] o wi32 Type "copyright", "credits" or "licese()" for more iformatio. >>> 25
26 The Magic of Pytho The >>> is a Pytho prompt idicatig that Pytho is ready for us to give it a commad. These commads are called statemets. >>> prit("hello, world ) Hello, world >>> prit(2+3) 5 >>> prit("2+3=", 2+3) 2+3= 5 >>> 26
27 The Magic of Pytho Usually we wat to execute several statemets together that solve a commo problem. Oe way to do this is to use a fuctio. >>> def hello(): prit("hello") prit("computers are Fu") >>> 27
28 The Magic of Pytho >>> def hello(): prit("hello") prit("computers are Fu") >>> The first lie tells Pytho we are defiig a ew fuctio called hello. The followig lies are ideted to show that they are part of the hello fuctio. The blak lie (hit eter twice) lets Pytho kow the defiitio is fiished. 28
29 The Magic of Pytho >>> def hello(): prit("hello") prit("computers are Fu") >>> Notice that othig has happeed yet! We ve defied the fuctio, but we have t told Pytho to perform the fuctio! A fuctio is ivoked by typig its ame. >>> hello() Hello Computers are Fu >>> 29
30 The Magic of Pytho What s the deal with the () s? Commads ca have chageable parts called parameters that are placed betwee the () s. >>> def greet(perso): prit("hello",perso) prit ("How are you?") >>> 30
31 The Magic of Pytho >>> greet("terry") Hello Terry How are you? >>> greet("paula") Hello Paula How are you? >>> Whe we use parameters, we ca customize the output of our fuctio. 31
32 The Magic of Pytho Whe we exit the Pytho prompt, the fuctios we ve defied cease to exist! Programs are usually composed of fuctios, modules, or scripts that are saved o disk so that they ca be used agai ad agai. A module file is a text file created i text editig software (saved as plai text ) that cotais fuctio defiitios. A programmig eviromet is desiged to help programmers write programs ad usually icludes automatic idetig, highlightig, etc. 32
33 The Magic of Pytho # File: chaos.py # A simple program illustratig chaotic behavior def mai(): prit("this program illustrates a chaotic fuctio") x = eval(iput("eter a umber betwee 0 ad 1: ")) for i i rage(10): x = 3.9 * x * (1 - x) prit(x) mai() We ll use fileame.py whe we save our work to idicate it s a Pytho program. I this code we re defiig a ew fuctio called mai. The mai() at the ed tells Pytho to ru the code. 33
34 The Magic of Pytho >>> This program illustrates a chaotic fuctio Eter a umber betwee 0 ad 1: >>> 34
35 Iside a Pytho Program # File: chaos.py # A simple program illustratig chaotic behavior Lies that start with # are called commets Iteded for huma readers ad igored by Pytho Pytho skips text from # to ed of lie 35
36 Iside a Pytho Program def mai(): Begiig of the defiitio of a fuctio called mai Sice our program has oly this oe module, it could have bee writte without the mai fuctio. The use of mai is customary, however. 36
37 Iside a Pytho Program prit("this program illustrates a chaotic fuctio") This lie causes Pytho to prit a message itroducig the program. 37
38 Iside a Pytho Program x = eval(iput("eter a umber betwee 0 ad 1: ")) x is a example of a variable A variable is used to assig a ame to a value so that we ca refer to it later. The quoted iformatio is displayed, ad the umber typed i respose is stored i x. 38
39 Iside a Pytho Program for i i rage(10): For is a loop costruct A loop tells Pytho to repeat the same thig over ad over. I this example, the followig code will be repeated 10 times. 39
40 Iside a Pytho Program x = 3.9 * x * (1 - x) prit(x) These lies are the body of the loop. The body of the loop is what gets repeated each time through the loop. The body of the loop is idetified through idetatio. The effect of the loop is the same as repeatig this two lies 10 times! 40
41 Iside a Pytho Program for i i rage(10): x = 3.9 * x * (1 - x) prit(x) These are equivalet! x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) x = 3.9 * x * (1 - x) prit(x) 41
42 Iside a Pytho Program x = 3.9 * x * (1 - x) This is called a assigmet statemet The part o the right-had side (RHS) of the = is a mathematical expressio. * is used to idicate multiplicatio Oce the value o the RHS is computed, it is stored back ito (assiged) ito x 42
43 Iside a Pytho Program mai() This last lie tells Pytho to execute the code i the fuctio mai 43
44 Chaos ad Computers The chaos.py program: def mai(): prit("this program illustrates a chaotic fuctio") x = eval(iput("eter a umber betwee 0 ad 1: ")) for i i rage(10): x = 3.9 * x * (1 - x) prit(x) mai() For ay give iput, returs 10 seemigly radom umbers betwee 0 ad 1 It appears that the value of x is chaotic 44
45 Chaos ad Computers The fuctio computed by program has the geeral form kx ( )(1- x) where k is 3.9 This type of fuctio is kow as a logistic fuctio. Models certai kids of ustable electroic circuits. Very small differeces i iitial value ca have large differeces i the output. 45
46 Chaos ad Computers Iput: Iput:
CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design
College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:
More informationPython Programming: An Introduction to Computer Science
Pytho Programmig: A Itroductio to Computer Sciece Chapter 6 Defiig Fuctios Pytho Programmig, 2/e 1 Objectives To uderstad why programmers divide programs up ito sets of cooperatig fuctios. To be able to
More informationChapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 1 Itroductio to Computers ad C++ Programmig Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 1.1 Computer Systems 1.2 Programmig ad Problem Solvig 1.3 Itroductio to C++ 1.4 Testig
More informationIntroduction to Computer Programming for Non-Majors CSC 2301, Fall The Department of Computer Science
Introduction to Computer Programming for Non-Majors CSC 2301, Fall 2015 The Department of Computer Science CSC 2301 Welcome to Class CSC 2301! Introduction to Computer Programming for Non-Majors Who are
More informationCS 111 Green: Program Design I Lecture 27: Speed (cont.); parting thoughts
CS 111 Gree: Program Desig I Lecture 27: Speed (cot.); partig thoughts By Nascarkig - Ow work, CC BY-SA 4.0, https://commos.wikimedia.org/w/idex.php?curid=38671041 Robert H. Sloa (CS) & Rachel Poretsky
More informationIntroduction to Computer Programming for Non-Majors
Introduction to Computer Programming for Non-Majors CSC 2301, Fall 2016 Chapter 1 Instructor: Long Ma The Department of Computer Science Objectives To understand the respective roles of hardware and software
More informationOne advantage that SONAR has over any other music-sequencing product I ve worked
*gajedra* D:/Thomso_Learig_Projects/Garrigus_163132/z_productio/z_3B2_3D_files/Garrigus_163132_ch17.3d, 14/11/08/16:26:39, 16:26, page: 647 17 CAL 101 Oe advatage that SONAR has over ay other music-sequecig
More informationCSE 111 Bio: Program Design I Lecture 17: software development, list methods
CSE 111 Bio: Program Desig I Lecture 17: software developmet, list methods Robert H. Sloa(CS) & Rachel Poretsky(Bio) Uiversity of Illiois, Chicago October 19, 2017 NESTED LOOPS: REVIEW Geerate times table
More informationCSE 111 Bio: Program Design I Class 11: loops
SE 111 Bio: Program Desig I lass 11: loops Radall Muroe, xkcd.com/1411/ Robert H. Sloa (S) & Rachel Poretsky (Bio) Uiversity of Illiois, hicago October 2, 2016 Pytho ets Loopy! he Pytho, Busch ardes Florida
More informationCS 111: Program Design I Lecture # 7: Web Crawler, Functions; Open Access
CS 111: Program Desig I Lecture # 7: Web Crawler, Fuctios; Ope Access Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago September 13, 2016 Lab Hit/Remider word = "hi" word.upper() à "HI" Questio
More informationChapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3
More informationCS 111: Program Design I Lecture # 7: First Loop, Web Crawler, Functions
CS 111: Program Desig I Lecture # 7: First Loop, Web Crawler, Fuctios Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago September 18, 2018 What will this prit? x = 5 if x == 3: prit("hi!")
More informationChapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 5 Fuctios for All Subtasks Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 5.1 void Fuctios 5.2 Call-By-Referece Parameters 5.3 Usig Procedural Abstractio 5.4 Testig ad Debuggig
More informationAbstract. Chapter 4 Computation. Overview 8/13/18. Bjarne Stroustrup Note:
Chapter 4 Computatio Bjare Stroustrup www.stroustrup.com/programmig Abstract Today, I ll preset the basics of computatio. I particular, we ll discuss expressios, how to iterate over a series of values
More informationPseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance
Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Pseudocode ( 1.1) High-level descriptio of a algorithm More structured
More informationCS 11 C track: lecture 1
CS 11 C track: lecture 1 Prelimiaries Need a CMS cluster accout http://acctreq.cms.caltech.edu/cgi-bi/request.cgi Need to kow UNIX IMSS tutorial liked from track home page Track home page: http://courses.cms.caltech.edu/courses/cs11/material
More informationHow do we evaluate algorithms?
F2 Readig referece: chapter 2 + slides Algorithm complexity Big O ad big Ω To calculate ruig time Aalysis of recursive Algorithms Next time: Litterature: slides mostly The first Algorithm desig methods:
More informationChapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 4 Procedural Abstractio ad Fuctios That Retur a Value Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 4.1 Top-Dow Desig 4.2 Predefied Fuctios 4.3 Programmer-Defied Fuctios 4.4
More informationThe >>> is a Python prompt indicating that Python is ready for us to give it a command. These commands are called statements.
When you start Python, you will see something like: Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information.
More informationGE FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III
GE2112 - FUNDAMENTALS OF COMPUTING AND PROGRAMMING UNIT III PROBLEM SOLVING AND OFFICE APPLICATION SOFTWARE Plaig the Computer Program Purpose Algorithm Flow Charts Pseudocode -Applicatio Software Packages-
More informationn Some thoughts on software development n The idea of a calculator n Using a grammar n Expression evaluation n Program organization n Analysis
Overview Chapter 6 Writig a Program Bjare Stroustrup Some thoughts o software developmet The idea of a calculator Usig a grammar Expressio evaluatio Program orgaizatio www.stroustrup.com/programmig 3 Buildig
More informationCMPT 125 Assignment 2 Solutions
CMPT 25 Assigmet 2 Solutios Questio (20 marks total) a) Let s cosider a iteger array of size 0. (0 marks, each part is 2 marks) it a[0]; I. How would you assig a poiter, called pa, to store the address
More informationCOP4020 Programming Languages. Compilers and Interpreters Prof. Robert van Engelen
COP4020 mig Laguages Compilers ad Iterpreters Prof. Robert va Egele Overview Commo compiler ad iterpreter cofiguratios Virtual machies Itegrated developmet eviromets Compiler phases Lexical aalysis Sytax
More information. Written in factored form it is easy to see that the roots are 2, 2, i,
CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or
More informationComputers and Scientific Thinking
Computers ad Scietific Thikig David Reed, Creighto Uiversity Chapter 15 JavaScript Strigs 1 Strigs as Objects so far, your iteractive Web pages have maipulated strigs i simple ways use text box to iput
More informationToday s objectives. CSE401: Introduction to Compiler Construction. What is a compiler? Administrative Details. Why study compilers?
CSE401: Itroductio to Compiler Costructio Larry Ruzzo Sprig 2004 Today s objectives Admiistrative details Defie compilers ad why we study them Defie the high-level structure of compilers Associate specific
More informationChapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 10 Defiig Classes Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 10.1 Structures 10.2 Classes 10.3 Abstract Data Types 10.4 Itroductio to Iheritace Copyright 2015 Pearso Educatio,
More informationChapter 2. C++ Basics. Copyright 2015 Pearson Education, Ltd.. All rights reserved.
Chapter 2 C++ Basics Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 2.1 Variables ad Assigmets 2.2 Iput ad Output 2.3 Data Types ad Expressios 2.4 Simple Flow of Cotrol 2.5 Program
More informationData Structures and Algorithms. Analysis of Algorithms
Data Structures ad Algorithms Aalysis of Algorithms Outlie Ruig time Pseudo-code Big-oh otatio Big-theta otatio Big-omega otatio Asymptotic algorithm aalysis Aalysis of Algorithms Iput Algorithm Output
More informationRunning Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments
Ruig Time Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects. The
More informationRunning Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments
Ruig Time ( 3.1) Aalysis of Algorithms Iput Algorithm Output A algorithm is a step- by- step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects.
More informationAnalysis of Algorithms
Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Ruig Time Most algorithms trasform iput objects ito output objects. The
More informationLecture 1: Introduction and Strassen s Algorithm
5-750: Graduate Algorithms Jauary 7, 08 Lecture : Itroductio ad Strasse s Algorithm Lecturer: Gary Miller Scribe: Robert Parker Itroductio Machie models I this class, we will primarily use the Radom Access
More informationCS : Programming for Non-Majors, Summer 2007 Programming Project #3: Two Little Calculations Due by 12:00pm (noon) Wednesday June
CS 1313 010: Programmig for No-Majors, Summer 2007 Programmig Project #3: Two Little Calculatios Due by 12:00pm (oo) Wedesday Jue 27 2007 This third assigmet will give you experiece writig programs that
More informationn Maurice Wilkes, 1949 n Organize software to minimize errors. n Eliminate most of the errors we made anyway.
Bjare Stroustrup www.stroustrup.com/programmig Chapter 5 Errors Abstract Whe we program, we have to deal with errors. Our most basic aim is correctess, but we must deal with icomplete problem specificatios,
More informationElementary Educational Computer
Chapter 5 Elemetary Educatioal Computer. Geeral structure of the Elemetary Educatioal Computer (EEC) The EEC coforms to the 5 uits structure defied by vo Neuma's model (.) All uits are preseted i a simplified
More informationAppendix D. Controller Implementation
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Appedix D Cotroller Implemetatio Cotroller Implemetatios Combiatioal logic (sigle-cycle); Fiite state machie (multi-cycle, pipelied);
More informationOnes Assignment Method for Solving Traveling Salesman Problem
Joural of mathematics ad computer sciece 0 (0), 58-65 Oes Assigmet Method for Solvig Travelig Salesma Problem Hadi Basirzadeh Departmet of Mathematics, Shahid Chamra Uiversity, Ahvaz, Ira Article history:
More informationCS 111: Program Design I Lecture 20: Web crawling, HTML, Copyright
CS 111: Program Desig I Lecture 20: Web crawlig, HTML, Copyright Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago November 8, 2016 WEB CRAWLER AGAIN Two bits of useful Pytho sytax Do't eed
More informationCOP4020 Programming Languages. Functional Programming Prof. Robert van Engelen
COP4020 Programmig Laguages Fuctioal Programmig Prof. Robert va Egele Overview What is fuctioal programmig? Historical origis of fuctioal programmig Fuctioal programmig today Cocepts of fuctioal programmig
More informationLecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming
Lecture Notes 6 Itroductio to algorithm aalysis CSS 501 Data Structures ad Object-Orieted Programmig Readig for this lecture: Carrao, Chapter 10 To be covered i this lecture: Itroductio to algorithm aalysis
More informationSolutions to Final COMS W4115 Programming Languages and Translators Monday, May 4, :10-5:25pm, 309 Havemeyer
Departmet of Computer ciece Columbia Uiversity olutios to Fial COM W45 Programmig Laguages ad Traslators Moday, May 4, 2009 4:0-5:25pm, 309 Havemeyer Closed book, o aids. Do questios 5. Each questio is
More informationWhat are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs
What are we goig to lear? CSC316-003 Data Structures Aalysis of Algorithms Computer Sciece North Carolia State Uiversity Need to say that some algorithms are better tha others Criteria for evaluatio Structure
More informationIntroduction to Computing Systems: From Bits and Gates to C and Beyond 2 nd Edition
Lecture Goals Itroductio to Computig Systems: From Bits ad Gates to C ad Beyod 2 d Editio Yale N. Patt Sajay J. Patel Origial slides from Gregory Byrd, North Carolia State Uiversity Modified slides by
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 22 Database Recovery Techiques Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Recovery algorithms Recovery cocepts Write-ahead
More informationEE 459/500 HDL Based Digital Design with Programmable Logic. Lecture 13 Control and Sequencing: Hardwired and Microprogrammed Control
EE 459/500 HDL Based Digital Desig with Programmable Logic Lecture 13 Cotrol ad Sequecig: Hardwired ad Microprogrammed Cotrol Refereces: Chapter s 4,5 from textbook Chapter 7 of M.M. Mao ad C.R. Kime,
More informationCOSC 1P03. Ch 7 Recursion. Introduction to Data Structures 8.1
COSC 1P03 Ch 7 Recursio Itroductio to Data Structures 8.1 COSC 1P03 Recursio Recursio I Mathematics factorial Fiboacci umbers defie ifiite set with fiite defiitio I Computer Sciece sytax rules fiite defiitio,
More information10/23/18. File class in Java. Scanner reminder. Files. Opening a file for reading. Scanner reminder. File Input and Output
File class i Java File Iput ad Output TOPICS File Iput Exceptio Hadlig File Output Programmers refer to iput/output as "I/O". The File class represets files as objects. The class is defied i the java.io
More informationMorgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5.
Morga Kaufma Publishers 26 February, 208 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Virtual Memory Review: The Memory Hierarchy Take advatage of the priciple
More informationRecursion. Computer Science S-111 Harvard University David G. Sullivan, Ph.D. Review: Method Frames
Uit 4, Part 3 Recursio Computer Sciece S-111 Harvard Uiversity David G. Sulliva, Ph.D. Review: Method Frames Whe you make a method call, the Java rutime sets aside a block of memory kow as the frame of
More informationA SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON
A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON Roberto Lopez ad Eugeio Oñate Iteratioal Ceter for Numerical Methods i Egieerig (CIMNE) Edificio C1, Gra Capitá s/, 08034 Barceloa, Spai ABSTRACT I this work
More informationSolution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions:
CS 604 Data Structures Midterm Sprig, 00 VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Istructios: Prit your ame i the space provided below. This examiatio is closed book ad closed
More informationExceptions. Your computer takes exception. The Exception Class. Causes of Exceptions
Your computer takes exceptio s s are errors i the logic of a program (ru-time errors). Examples: i thread mai java.io.filenotfoud: studet.txt (The system caot fid the file specified.) i thread mai java.lag.nullpoiter:
More informationAnalysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis
Itro to Algorithm Aalysis Aalysis Metrics Slides. Table of Cotets. Aalysis Metrics 3. Exact Aalysis Rules 4. Simple Summatio 5. Summatio Formulas 6. Order of Magitude 7. Big-O otatio 8. Big-O Theorems
More informationCMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago
CMSC 22200 Computer Architecture Lecture 12: Virtual Memory Prof. Yajig Li Uiversity of Chicago A System with Physical Memory Oly Examples: most Cray machies early PCs Memory early all embedded systems
More informationCOMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 4. The Processor. Part A Datapath Design
COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter The Processor Part A path Desig Itroductio CPU performace factors Istructio cout Determied by ISA ad compiler. CPI ad
More informationIt just came to me that I 8.2 GRAPHS AND CONVERGENCE
44 Chapter 8 Discrete Mathematics: Fuctios o the Set of Natural Numbers (a) Take several odd, positive itegers for a ad write out eough terms of the 3N sequece to reach a repeatig loop (b) Show that ot
More informationThe number n of subintervals times the length h of subintervals gives length of interval (b-a).
Simulator with MadMath Kit: Riema Sums (Teacher s pages) I your kit: 1. GeoGebra file: Ready-to-use projector sized simulator: RiemaSumMM.ggb 2. RiemaSumMM.pdf (this file) ad RiemaSumMMEd.pdf (educator's
More information3.1 Overview of MySQL Programs. These programs are discussed further in Chapter 4, Database Administration. Client programs that access the server:
3 Usig MySQL Programs This chapter provides a brief overview of the programs provided by MySQL AB ad discusses how to specify optios whe you ru these programs. Most programs have optios that are specific
More informationWorkflow model GM AR. Gumpy. Dynagump. At a very high level, this is what gump does. We ll be looking at each of the items described here seperately.
Workflow model GM AR Gumpy RM Dyagump At a very high level, this is what gump does. We ll be lookig at each of the items described here seperately. User edits project descriptor ad commits s maitai their
More informationFundamentals of. Chapter 1. Microprocessor and Microcontroller. Dr. Farid Farahmand. Updated: Tuesday, January 16, 2018
Fudametals of Chapter 1 Microprocessor ad Microcotroller Dr. Farid Farahmad Updated: Tuesday, Jauary 16, 2018 Evolutio First came trasistors Itegrated circuits SSI (Small-Scale Itegratio) to ULSI Very
More informationChapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.
Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4
More informationBaan Tools User Management
Baa Tools User Maagemet Module Procedure UP008A US Documetiformatio Documet Documet code : UP008A US Documet group : User Documetatio Documet title : User Maagemet Applicatio/Package : Baa Tools Editio
More informationLecture 9: Exam I Review
CS 111 (Law): Program Desig I Lecture 9: Exam I Review Robert H. Sloa & Richard Warer Uiversity of Illiois, Chicago September 22, 2016 This Class Discuss midterm topics Go over practice examples Aswer
More informationCS 111: Program Design I Lecture 16: Module Review, Encodings, Lists
CS 111: Program Desig I Lecture 16: Module Review, Ecodigs, Lists Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago October 18, 2016 Last time Dot otatio ad methods Padas: user maual poit
More informationOutline and Reading. Analysis of Algorithms. Running Time. Experimental Studies. Limitations of Experiments. Theoretical Analysis
Outlie ad Readig Aalysis of Algorithms Iput Algorithm Output Ruig time ( 3.) Pseudo-code ( 3.2) Coutig primitive operatios ( 3.3-3.) Asymptotic otatio ( 3.6) Asymptotic aalysis ( 3.7) Case study Aalysis
More informationParabolic Path to a Best Best-Fit Line:
Studet Activity : Fidig the Least Squares Regressio Lie By Explorig the Relatioship betwee Slope ad Residuals Objective: How does oe determie a best best-fit lie for a set of data? Eyeballig it may be
More informationThe Open University, Walton Hall, Milton Keynes, MK7 6AA First published 2004
8 Programs ad data This publicatio forms part of a Ope Uiversity course M150 Data, Computig ad Iformatio. Details of this ad other Ope Uiversity courses ca be obtaied from the Course Iformatio ad Advice
More informationEE260: Digital Design, Spring /16/18. n Example: m 0 (=x 1 x 2 ) is adjacent to m 1 (=x 1 x 2 ) and m 2 (=x 1 x 2 ) but NOT m 3 (=x 1 x 2 )
EE26: Digital Desig, Sprig 28 3/6/8 EE 26: Itroductio to Digital Desig Combiatioal Datapath Yao Zheg Departmet of Electrical Egieerig Uiversity of Hawaiʻi at Māoa Combiatioal Logic Blocks Multiplexer Ecoders/Decoders
More informationCIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13
CIS Data Structures ad Algorithms with Java Sprig 08 Stacks ad Queues Moday, February / Tuesday, February Learig Goals Durig this lab, you will: Review stacks ad queues. Lear amortized ruig time aalysis
More informationBOOLEAN MATHEMATICS: GENERAL THEORY
CHAPTER 3 BOOLEAN MATHEMATICS: GENERAL THEORY 3.1 ISOMORPHIC PROPERTIES The ame Boolea Arithmetic was chose because it was discovered that literal Boolea Algebra could have a isomorphic umerical aspect.
More informationChapter 4 The Datapath
The Ageda Chapter 4 The Datapath Based o slides McGraw-Hill Additioal material 24/25/26 Lewis/Marti Additioal material 28 Roth Additioal material 2 Taylor Additioal material 2 Farmer Tae the elemets that
More informationCHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs
CHAPTER IV: GRAPH THEORY Sectio : Itroductio to Graphs Sice this class is called Number-Theoretic ad Discrete Structures, it would be a crime to oly focus o umber theory regardless how woderful those topics
More informationChapter 6. I/O Streams as an Introduction to Objects and Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.
Chapter 6 I/O Streams as a Itroductio to Objects ad Classes Overview 6.1 Streams ad Basic File I/O 6.2 Tools for Stream I/O 6.3 Character I/O Slide 6-3 6.1 Streams ad Basic File I/O I/O Streams I/O refers
More informationGetting Started. Getting Started - 1
Gettig Started Gettig Started - 1 Issue 1 Overview of Gettig Started Overview of Gettig Started This sectio explais the basic operatios of the AUDIX system. It describes how to: Log i ad log out of the
More informationimplement language system
Outlie Priciples of programmig laguages Lecture 3 http://few.vu.l/~silvis/ppl/2007 Part I. Laguage systems Part II. Fuctioal programmig. First look at ML. Natalia Silvis-Cividjia e-mail: silvis@few.vu.l
More informationAnalysis of Algorithms
Presetatio for use with the textbook, Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 2015 Aalysis of Algorithms Iput 2015 Goodrich ad Tamassia Algorithm Aalysis of Algorithms
More informationAnalysis of Algorithms
Aalysis of Algorithms Ruig Time of a algorithm Ruig Time Upper Bouds Lower Bouds Examples Mathematical facts Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite
More informationThreads and Concurrency in Java: Part 1
Cocurrecy Threads ad Cocurrecy i Java: Part 1 What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.
More informationProject 2.5 Improved Euler Implementation
Project 2.5 Improved Euler Implemetatio Figure 2.5.10 i the text lists TI-85 ad BASIC programs implemetig the improved Euler method to approximate the solutio of the iitial value problem dy dx = x+ y,
More informationThreads and Concurrency in Java: Part 1
Threads ad Cocurrecy i Java: Part 1 1 Cocurrecy What every computer egieer eeds to kow about cocurrecy: Cocurrecy is to utraied programmers as matches are to small childre. It is all too easy to get bured.
More informationK-NET bus. When several turrets are connected to the K-Bus, the structure of the system is as showns
K-NET bus The K-Net bus is based o the SPI bus but it allows to addressig may differet turrets like the I 2 C bus. The K-Net is 6 a wires bus (4 for SPI wires ad 2 additioal wires for request ad ackowledge
More informationFrom last week. Lecture 5. Outline. Principles of programming languages
Priciples of programmig laguages From last week Lecture 5 http://few.vu.l/~silvis/ppl/2007 Natalia Silvis-Cividjia e-mail: silvis@few.vu.l ML has o assigmet. Explai how to access a old bidig? Is & for
More informationCS 111: Program Design I Lecture 20: Web crawling, HTML, Copyright
CS 111: Program Desig I Lecture 20: Web crawlig, HTML, Copyright Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago November 8, 2016 Most importat thig If you have ot yet voted (ad are a US
More informationOverview Chapter 12 A display model
Overview Chapter 12 A display model Why graphics? A graphics model Examples Bjare Stroustrup www.stroustrup.com/programmig 3 Why bother with graphics ad GUI? Why bother with graphics ad GUI? It s very
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 18 Strategies for Query Processig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio DBMS techiques to process a query Scaer idetifies
More informationBEA WebLogic XML/Non-XML Translator. Samples Guide
BEA WebLogic XML/No-XML Traslator Samples Guide BEA WebLobic XML/No-XML Traslator Samples Guide 1.0.1 Documet Editio 1.1 March 2001 Copyright Copyright 2000, 2001 BEA Systems, Ic. All Rights Reserved.
More informationCS 111: Program Design I Lecture 15: Objects, Pandas, Modules. Robert H. Sloan & Richard Warner University of Illinois at Chicago October 13, 2016
CS 111: Program Desig I Lecture 15: Objects, Padas, Modules Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago October 13, 2016 OBJECTS AND DOT NOTATION Objects (Implicit i Chapter 2, Variables,
More informationBehavioral Modeling in Verilog
Behavioral Modelig i Verilog COE 202 Digital Logic Desig Dr. Muhamed Mudawar Kig Fahd Uiversity of Petroleum ad Mierals Presetatio Outlie Itroductio to Dataflow ad Behavioral Modelig Verilog Operators
More informationCS 111: Program Design I Lecture 15: Modules, Pandas again. Robert H. Sloan & Richard Warner University of Illinois at Chicago March 8, 2018
CS 111: Program Desig I Lecture 15: Modules, Padas agai Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago March 8, 2018 PYTHON STANDARD LIBRARY & BEYOND: MODULES Extedig Pytho Every moder
More informationChapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved.
Chapter 8 Strigs ad Vectors Overview 8.1 A Array Type for Strigs 8.2 The Stadard strig Class 8.3 Vectors Slide 8-3 8.1 A Array Type for Strigs A Array Type for Strigs C-strigs ca be used to represet strigs
More informationCode Review Defects. Authors: Mika V. Mäntylä and Casper Lassenius Original version: 4 Sep, 2007 Made available online: 24 April, 2013
Code Review s Authors: Mika V. Mätylä ad Casper Lasseius Origial versio: 4 Sep, 2007 Made available olie: 24 April, 2013 This documet cotais further details of the code review defects preseted i [1]. of
More informationENGI 4421 Probability and Statistics Faculty of Engineering and Applied Science Problem Set 1 Descriptive Statistics
ENGI 44 Probability ad Statistics Faculty of Egieerig ad Applied Sciece Problem Set Descriptive Statistics. If, i the set of values {,, 3, 4, 5, 6, 7 } a error causes the value 5 to be replaced by 50,
More information1 Enterprise Modeler
1 Eterprise Modeler Itroductio I BaaERP, a Busiess Cotrol Model ad a Eterprise Structure Model for multi-site cofiguratios are itroduced. Eterprise Structure Model Busiess Cotrol Models Busiess Fuctio
More informationOutline. CSCI 4730 Operating Systems. Questions. What is an Operating System? Computer System Layers. Computer System Layers
Outlie CSCI 4730 s! What is a s?!! System Compoet Architecture s Overview Questios What is a?! What are the major operatig system compoets?! What are basic computer system orgaizatios?! How do you commuicate
More informationNTH, GEOMETRIC, AND TELESCOPING TEST
NTH, GEOMETRIC, AND TELESCOPING TEST Sectio 9. Calculus BC AP/Dual, Revised 08 viet.dag@humbleisd.et /4/08 0:0 PM 9.: th, Geometric, ad Telescopig Test SUMMARY OF TESTS FOR SERIES Lookig at the first few
More informationIntroduction CHAPTER Computers
Iside a Computer CHAPTER Itroductio. Computers A computer is a electroic device that accepts iput, stores data, processes data accordig to a set of istructios (called program), ad produces output i desired
More informationEnd Semester Examination CSE, III Yr. (I Sem), 30002: Computer Organization
Ed Semester Examiatio 2013-14 CSE, III Yr. (I Sem), 30002: Computer Orgaizatio Istructios: GROUP -A 1. Write the questio paper group (A, B, C, D), o frot page top of aswer book, as per what is metioed
More informationCopyright 2016 Ramez Elmasri and Shamkant B. Navathe
Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 20 Itroductio to Trasactio Processig Cocepts ad Theory Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Trasactio Describes local
More informationCS 111: Program Design I Lecture #26: Heat maps, Nothing, Predictive Policing
CS 111: Program Desig I Lecture #26: Heat maps, Nothig, Predictive Policig Robert H. Sloa & Richard Warer Uiversity of Illiois at Chicago November 29, 2018 Some Logistics Extra credit: Sample Fial Exam
More information