This Week. Trapezoidal Rule, theory. Warmup Example: Numeric Integration. Trapezoidal Rule, pseudocode. Trapezoidal Rule, implementation

Size: px
Start display at page:

Download "This Week. Trapezoidal Rule, theory. Warmup Example: Numeric Integration. Trapezoidal Rule, pseudocode. Trapezoidal Rule, implementation"

Transcription

1 This Week ENGG8 Computing for Engineers Week 9 Recursion, External Application Interfacing Monday: numeric integration example, then first part of the material Wednesday 9am: rest of the new material Wednesday pm: more worked examples, see slides 3-5 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide Warmup Example: Numeric Integration Numerical integration approximates the solution to a definite integral that may not have a closed form by using a series of shapes to model the area under the curve Simplest of these is the Trapezoidal Rule, which uses thin vertical slices with a straight line at the top (forming adjacent trapeziums) a f(x) b Integral of f(x) from a to b is approximated by the sum of the areas inside the red trapeziums ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 3 Trapezoidal Rule, theory References: Wikipedia, many other web refs Animation: mations/quadrature/trapezoidal/trapezoidalaa.html After doing the maths for n equally spaced panels, the formula reduces to b a δ ( f ( x ) + f ( x ) + f ( x ) + K+ f ( x ) f ( x )) f ( x) dx n + Panel width b a δ = n 0 n Twice the middle values where xi = a + i( b a) / n = a + i *δ End-points counted once only ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 4 Trapezoidal Rule, pseudocode Trapezoidal Rule, implementation We can easily convert this to pseudocode: set sum to f (a) + f (b) set delta to the panel width For p = To add to sum Next p area = Function TrapArea(a As Double, b As Double, _ n as integer) As Double Limitations: for this quick example, we will represent the function to be integrated as a VBA function called directly from TrapArea. It is possible to specify it as a formula on the sheet, which is easier for end users (and was done in an assignment in previous years) ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 5 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 6

2 References Recursion is covered quite nicely at not quite so well in Chapra Section.4 Recursion Recursion Sometimes a solution to a problem can be expressed naturally in terms of one or more simpler versions of the same solution. For example, the factorial definition is just n! = n ( n )!, n! =, if n > 0 if n = 0 This is called a recursive definition, and can be implemented directly in most programming languages Recursion depends strongly on correctly identifying the base case, where no further subdivision occurs. ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 7 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 8 Recursive Factorial Recursion is implemented through functions or subprograms calling themselves rather than another procedure Works provided the base case is handled and there are sufficient resources to sustain the calculation Function fact(n As Integer) As Long If n = 0 Then fact = Else fact = n * fact(n-) End Function Tracing Factorial Trace the calculation as with other procedure calls fact(5) = 5 * fact(4) fact(4) = 4 * fact(3) fact(3) = 3 * fact() fact() = * fact() fact() = * fact(0) fact(0) = fact() = * = fact() = * = fact(3) = 3 * = 6 fact(4) = 4 * 6 = 4 fact(5) = 5 * 4 = 0 Each function waits for the recursive call to return Each function uses the value from the recursive call to calculate and return its factorial ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 9 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 0 Tail Recursion The Factorial function is an example of what s called tail recursion, where each call results in either no recursion (the base case), or one recursive call in an expression Tail recursion produces a sequence, called a stack of pending procedure calls Tail recursion can always be replaced by iteration, which generally consumes less resources Naughty Recursion Recursion often gets a bad name because implementing some algorithms directly produces horribly inefficient code that reevaluates things over and over Classic case is the Fibonacci sequence*: Function BadFib(n As Integer) As Long If n <= Then BadFib = Else BadFib = BadFib(n-) + BadFib(n-) End Function * Regrettably, this is the solution to Chapra s misguided exercise 6, page 47 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide

3 tree has n levels Why BadFib is Bad Tracing calls on BadFib produces a tree rather than a simple stack of calls: is evaluated three times independently F(4) F(5) F(6) F(4) Recursion in Nature Some things in nature contain elements that are smaller copies of themselves (this is called self-similarity). The branching patterns of creeks and rivers, ferns, cloud patterns and blood vessels are all examples. Anne Burns (Long Island University) has a nice paper on the web (ref below) describing general techniques for creating images such as this one. Nothing in the picture is real. ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 3 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 4 Recursive Drawings We can do a tiny bit of this with the simple drawing tools available Draw a simple figure, then several smaller copies positioned relative to the larger one Copies are drawn recursively Recursion stops when the elements get small enough that the detail can t be seen Can t (easily) convert to iteration unless only one copy (e.g., picture of A- series paper sizes) General approach: Recursive Drawing Procedure Sub DrawThing(x As Single, y As Single, size As Single) If size < MIN_SIZE Then Exit Sub draw figure at position (x, y) ' calculate position of first copy x = : y = DrawThing(x, y, size*scale_factor) ' same for other copies DrawThing(x, y, size*scale_factor) End Sub Constant describing the smallest effective size Constant describing the reduction in size for each copy Source: Wikipedia ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 5 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 6 H-Trees The following is from the Princeton reference. Recursive graphics. Simple recursive drawing schemes can lead to pictures that are remarkably intricate. For example, an H-tree of order n is defined as follows: The base case is do nothing for n = 0. The reduction step is to draw, within the unit square three lines in the shape of the letter H [then] four H-trees of order n, one connected to each tip of the H with the additional provisos that the H-trees of order n are centered in the four quadrants of the square, halved in size. Question: What size will the entire picture be compared to the first H? (This is related to Zeno s Paradox about Achilles and the Tortoise) H-Trees Apart from drawing a canvas, the algorithm for drawing an H-Tree centred on (x,y) is just (x+hsize,y HTree(x,y,size) :- If size < MIN_SIZE Then Exit Sub (x,y) hsize = size/ ' half-size (x+hsize,y-hsize) hsize) Draw horizontal line through (x,y) of length size Draw vertical lines through (x-hsize,y) and (x+hsize,y) HTree x-hsize, y+hsize, hsize ' bottom left HTree x-hsize, y-hsize, hsize ' top left HTree x+hsize, y-hsize, hsize ' top right HTree x+hsize, y+hsize, hsize ' bottom right Use a separate subprogram to draw the lines, so you can apply the attributes consistently and once only size hsize ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 7 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 8 3

4 H-Tree Demo See the demo workbook. To make it more useful as a learning tool, the following have been added a ClearDrawing subroutine a DrawCanvas subroutine (shape reference saved) a depth parameter, indicating how many calls are active colours, derived from the depth a visible stack, showing the depth in boxes timings, to demonstrate inefficiencies in VBA s collections Most important parts are the subprograms DrawHTree, HTree itself and DrawLine Office Interfacing All MS Office applications can start and interact with any other Office app For example, Excel can start Word and transfer data from a sheet to a table Word can start Outlook and send s (if an server is available) Excel can obtain data from an Access database (though this requires a lot of fiddling around) Depending on your processor, the picture will take a couple of minutes to draw, and the drawing rate will slow down as each line is added to the shape collection. ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 9 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 0 Example: Creating a Word Doc Object Reference Settings ' Example adapted from Shepherd, Excel VBA Sub Test_Word() Dim objwordapp As Word.Application ' reference to Word (the app) Dim objworddoc As Word.Document ' ref to a newly created doc Set objwordapp = CreateObject("Word.Application") Set objworddoc = objwordapp.documents.add With objworddoc.sections().range.text = "My new Word Document".SaveAs "c:\mytest.doc" ' must use full pathname.close End With ' These are required to make sure MS Word shuts down completely Set objworddoc = Nothing Set objwordapp = Nothing End Sub Unfortunately this fails to satisfy the compiler. The error points to Word.Application Select Tools References on the VBE menu, scroll to Microsoft Word * Object Library and check. Press OK. * or largest value: 0=Office00, =Office003, =Office007 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide This is the end of the new VBA material (all together now, a big groan of disappointment) Some short worked examples of the kind that could be set for the final exam will follow. A bearing is an angle measured clockwise from North Write a VBA subprogram that candy-stripes the active worksheet. Candy-striping fills the background of every second row with a faint grey colour. Stop with the first empty cell in column A. Use the macro recorder to gather information about colouring rows, then work on the loop to apply the fills. A back bearing is the bearing that is exactly opposite a given bearing. Bearings lie between 0 and 360 degrees. For example, if I'm sighting a landmark at that has a compass bearing of 0 degrees (slightly South of East), the back bearing is 90 degrees (slightly North of West). The back bearing is the bearing from the landmark back to me. Write a VBA function BackBearing that returns the back bearing for any given bearing, expressed in degrees between 0.0 (inclusive) and (exclusive). ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 3 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 4 4

5 3 A worksheet contains rainfall data for Liverpool, NSW for the month of April 009, downloaded from A domestic water tank is fed from the guttering of a house. Given the roof area, tank capacity and initial amount of water in the tank, complete the worksheet using a VBA procedure. Assume no water is drawn from the tank over the month. Analysis: how much water does mm of rain produce per m of area? Named cells RoofArea and TankCapacity Summary Recursion is a natural way to express some algorithms tail recursion can be replaced by iteration care must be taken to avoid recursion that re-evaluates the same thing over and over drawing recursive pictures may help in understanding how recursion works Sometimes you need to think creatively about solutions Office apps can create and manipulate documents and data through the use each other s object models expressed in VBA. VBA fills in this column ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 5 ENGG8 UNSW, CRICOS Provider No: 00098G W9 slide 6 5

ENGG1811 Computing for Engineers Week 10 Recursion, External Application Interfacing

ENGG1811 Computing for Engineers Week 10 Recursion, External Application Interfacing ENGG1811 Computing for Engineers Week 10 Recursion, External Application Interfacing ENGG1811 UNSW, CRICOS Provider No: 00098G W10 slide 1 This Week Wednesday am: Will include discussion about assignment

More information

ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration

ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration ENGG1811 Computing for Engineers Week 9 Dialogues and Forms Numerical Integration ENGG1811 UNSW, CRICOS Provider No: 00098G W9 slide 1 References & Info Chapra (Part 2 of ENGG1811 Text) Topic 21 (chapter

More information

More Complicated Recursion CMPSC 122

More Complicated Recursion CMPSC 122 More Complicated Recursion CMPSC 122 Now that we've gotten a taste of recursion, we'll look at several more examples of recursion that are special in their own way. I. Example with More Involved Arithmetic

More information

Ms Excel Vba Continue Loop Through Range Of

Ms Excel Vba Continue Loop Through Range Of Ms Excel Vba Continue Loop Through Range Of Rows Learn how to make your VBA code dynamic by coding in a way that allows your 5 Different Ways to Find The Last Row or Last Column Using VBA In Microsoft

More information

References. Iteration For. Iteration (Repetition) Iteration While. For loop examples

References. Iteration For. Iteration (Repetition) Iteration While. For loop examples ENGG1811 UNSW, CRICOS Provider No: 00098G W6 slide 1 References ENGG1811 Computing for Engineers Week 6 Iteration; Sequential Algorithms; Strings and Built-in Functions Chapra (Part 2 of ENGG1811 Text)

More information

Solutions to Problem 1 of Homework 3 (10 (+6) Points)

Solutions to Problem 1 of Homework 3 (10 (+6) Points) Solutions to Problem 1 of Homework 3 (10 (+6) Points) Sometimes, computing extra information can lead to more efficient divide-and-conquer algorithms. As an example, we will improve on the solution to

More information

Data. Selecting Data. Sorting Data

Data. Selecting Data. Sorting Data 1 of 1 Data Selecting Data To select a large range of cells: Click on the first cell in the area you want to select Scroll down to the last cell and hold down the Shift key while you click on it. This

More information

Excel. Spreadsheet functions

Excel. Spreadsheet functions Excel Spreadsheet functions Objectives Week 1 By the end of this session you will be able to :- Move around workbooks and worksheets Insert and delete rows and columns Calculate with the Auto Sum function

More information

How to Open Excel. Introduction to Excel TIP: Right click Excel on list and select PIN to Start Menu. When you open Excel, a new worksheet opens

How to Open Excel. Introduction to Excel TIP: Right click Excel on list and select PIN to Start Menu. When you open Excel, a new worksheet opens Introduction to Excel 2010 What is Excel? It is a Microsoft Office computer software program to organize and analyze numbers, data and labels in spreadsheet form. Excel makes it easy to translate data

More information

Table of Contents. Tip 1: Page setup 3. Tip 2: Printing different ranges in a spreadsheet 5. Tip 3: Ensuring that a long formula is displayed 6

Table of Contents. Tip 1: Page setup 3. Tip 2: Printing different ranges in a spreadsheet 5. Tip 3: Ensuring that a long formula is displayed 6 Table of Contents Tip 1: Page setup 3 Tip 2: Printing different ranges in a spreadsheet 5 Tip 3: Ensuring that a long formula is displayed 6 Tip 4: Displaying two worksheets at the same time 7 Tip 5: How

More information

Adjacent sides are next to each other and are joined by a common vertex.

Adjacent sides are next to each other and are joined by a common vertex. Acute angle An angle less than 90. A Adjacent Algebra Angle Approximate Arc Area Asymmetrical Average Axis Adjacent sides are next to each other and are joined by a common vertex. Algebra is the branch

More information

APCS-AB: Java. Recursion in Java December 12, week14 1

APCS-AB: Java. Recursion in Java December 12, week14 1 APCS-AB: Java Recursion in Java December 12, 2005 week14 1 Check point Double Linked List - extra project grade Must turn in today MBCS - Chapter 1 Installation Exercises Analysis Questions week14 2 Scheme

More information

2.3 Recursion 7/21/2014 5:12:34 PM

2.3 Recursion 7/21/2014 5:12:34 PM 3 Recursion Introduction to Programming in Java: An Interdisciplinary Approach Robert Sedgewick and Kevin Wayne Copyright 2002 2010 7/21/2014 5:12:34 PM Factorial The factorial of a positive integer N

More information

Name: Tutor s

Name: Tutor s Name: Tutor s Email: Bring a couple, just in case! Necessary Equipment: Black Pen Pencil Rubber Pencil Sharpener Scientific Calculator Ruler Protractor (Pair of) Compasses 018 AQA Exam Dates Paper 1 4

More information

ENGG1811 Computing for Engineers Chapra (Part 2 of ENGG1811 Text) Topic 10 (chapter 3) Macro Recorder. Examples

ENGG1811 Computing for Engineers Chapra (Part 2 of ENGG1811 Text) Topic 10 (chapter 3) Macro Recorder. Examples References ENGG1811 Computing for Engineers Chapra (Part 2 of ENGG1811 Text) Topic 10 (chapter 3) Macro Recorder Week 8 Objects and Collections; Using the Macro Recorder; Shapes ENGG1811 VBA Reference

More information

Introduction to Microsoft Excel

Introduction to Microsoft Excel Chapter A spreadsheet is a computer program that turns the computer into a very powerful calculator. Headings and comments can be entered along with detailed formulas. The spreadsheet screen is divided

More information

UNIT 15 Polygons Lesson Plan 1 Angles

UNIT 15 Polygons Lesson Plan 1 Angles Y8 UNIT 15 Polygons Lesson Plan 1 Angles 1A 1B Revising angles T: You must know lots of facts about angles. Let's see how many you can remember. - How many degrees are there around a point? ( 360 ) - How

More information

Using Word & Excel to Label and Calculate Catchment Areas and Rainfall Income

Using Word & Excel to Label and Calculate Catchment Areas and Rainfall Income Using Word & Excel to Label and Calculate Catchment Areas and Rainfall Income There are lots of little details you ll need to understand to use Word as a drawing tool, but each individual detail is pretty

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

Angle, symmetry and transformation

Angle, symmetry and transformation Terms Illustrations Definition Acute angle An angle greater than 0 and less than 90. Alternate angles Where two straight lines are cut by a third, as in the diagrams, the angles d and f (also c and e)

More information

6.001 Notes: Section 4.1

6.001 Notes: Section 4.1 6.001 Notes: Section 4.1 Slide 4.1.1 In this lecture, we are going to take a careful look at the kinds of procedures we can build. We will first go back to look very carefully at the substitution model,

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data

More information

Department of Computer Science Yale University Office: 314 Watson Closely related to mathematical induction.

Department of Computer Science Yale University Office: 314 Watson Closely related to mathematical induction. 2/6/12 Overview CS 112 Introduction to Programming What is recursion? When one function calls itself directly or indirectly. (Spring 2012) Why learn recursion? New mode of thinking. Powerful programming

More information

Using Flash Animation Basics

Using Flash Animation Basics Using Flash Contents Using Flash... 1 Animation Basics... 1 Exercise 1. Creating a Symbol... 2 Exercise 2. Working with Layers... 4 Exercise 3. Using the Timeline... 6 Exercise 4. Previewing an animation...

More information

CS 112 Introduction to Programming

CS 112 Introduction to Programming CS 112 Introduction to Programming (Spring 2012) Lecture #13: Recursion Zhong Shao Department of Computer Science Yale University Office: 314 Watson http://flint.cs.yale.edu/cs112 Acknowledgements: some

More information

COMPUTING AND DATA ANALYSIS WITH EXCEL. Numerical integration techniques

COMPUTING AND DATA ANALYSIS WITH EXCEL. Numerical integration techniques COMPUTING AND DATA ANALYSIS WITH EXCEL Numerical integration techniques Outline 1 Quadrature in one dimension Mid-point method Trapezium method Simpson s methods Uniform random number generation in Excel,

More information

ADD AND NAME WORKSHEETS

ADD AND NAME WORKSHEETS 1 INTERMEDIATE EXCEL While its primary function is to be a number cruncher, Excel is a versatile program that is used in a variety of ways. Because it easily organizes, manages, and displays information,

More information

Working with Excel CHAPTER 1

Working with Excel CHAPTER 1 CHAPTER 1 Working with Excel You use Microsoft Excel to create spreadsheets, which are documents that enable you to manipulate numbers and formulas to quickly create powerful mathematical, financial, and

More information

Ms Excel Vba Continue Loop Through Columns Range

Ms Excel Vba Continue Loop Through Columns Range Ms Excel Vba Continue Loop Through Columns Range Learn how to make your VBA code dynamic by coding in a way that allows your 5 Different Ways to Find The Last Row or Last Column Using VBA In Microsoft

More information

Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way

Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way Introduction Earthwork 3D for Dummies Doing a digitized dirt takeoff calculation the swift and easy way Getting to know you Earthwork has inherited its layout from its ancestors, Sitework 98 and Edge.

More information

Working with Excel involves two basic tasks: building a spreadsheet and then manipulating the

Working with Excel involves two basic tasks: building a spreadsheet and then manipulating the Working with Excel You use Microsoft Excel to create spreadsheets, which are documents that enable you to manipulate numbers and formulas to create powerful mathematical, financial, and statistical models

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Formatting a spreadsheet means changing the way it looks to make it neater and more attractive. Formatting changes can include modifying number styles, text size and colours. Many

More information

Separate Text Across Cells The Convert Text to Columns Wizard can help you to divide the text into columns separated with specific symbols.

Separate Text Across Cells The Convert Text to Columns Wizard can help you to divide the text into columns separated with specific symbols. Chapter 7 Highlights 7.1 The Use of Formulas and Functions 7.2 Creating Charts 7.3 Using Chart Toolbar 7.4 Changing Source Data of a Chart Separate Text Across Cells The Convert Text to Columns Wizard

More information

Year 6 Summer Term Week 1 to 2 Geometry: Properties of Shapes

Year 6 Summer Term Week 1 to 2 Geometry: Properties of Shapes Measure with a protractor Introduce angles Calculate angles Vertically opposite angles Angles in a triangle Angles in a triangle special cases Angles in a triangle missing angles Angles in special quadrilaterals

More information

Unit 5: Recursive Thinking

Unit 5: Recursive Thinking AP Computer Science Mr. Haytock Unit 5: Recursive Thinking Topics: I. Recursion II. Computational limits III. Recursion in graphics Materials: I. Hein ch. 3.2 II. Rawlins: Towers of Hanoi III. Lewis &

More information

ENGG1811 Computing for Engineers Chapra (Part 2 of ENGG1811 Text) Topic 10 (chapter 3) Macro Recorder. Examples

ENGG1811 Computing for Engineers Chapra (Part 2 of ENGG1811 Text) Topic 10 (chapter 3) Macro Recorder. Examples References ENGG1811 Computing for Engineers Chapra (Part 2 of ENGG1811 Text) Topic 10 (chapter 3) Macro Recorder Week 8 Objects and Collections; Using the Macro Recorder; Shapes Note: there is very limited

More information

9. a. 11. A = 30 cm 2, P = 30 cm. 12. A = 29 cm 2, P = 13. A = 72 in. 2, P = 35 in.

9. a. 11. A = 30 cm 2, P = 30 cm. 12. A = 29 cm 2, P = 13. A = 72 in. 2, P = 35 in. Answers Applications. Area = 20 cm 2 (base = 5 cm, height = cm), perimeter = 20 cm (Each side is 5 cm.) 2. Area = 9 cm 2 (base = 3 cm, height = 3 cm), perimeter 2. cm (The side lengths are 3 cm and ~ 3.2

More information

Overview. What is recursion? When one function calls itself directly or indirectly.

Overview. What is recursion? When one function calls itself directly or indirectly. 1 2.3 Recursion Overview What is recursion? When one function calls itself directly or indirectly. Why learn recursion? New mode of thinking. Powerful programming paradigm. Many computations are naturally

More information

Year. Small Steps Guidance and Examples. Block 1 Properties of Shapes. Released March 2018

Year. Small Steps Guidance and Examples. Block 1 Properties of Shapes. Released March 2018 Released March 2018 The sequence of small steps has been produced by White Rose Maths. White Rose Maths gives permission to schools and teachers to use the small steps in their own teaching in their own

More information

You must bring your ID to the exam.

You must bring your ID to the exam. Com S 227 Spring 2017 Topics and review problems for Exam 2 Monday, April 3, 6:45 pm Locations, by last name: (same locations as Exam 1) A-E Coover 2245 F-M Hoover 2055 N-S Physics 0005 T-Z Hoover 1213

More information

ENGG1811 Computing for Engineers Week 6 Iteration; Sequential Algorithms; Processing Cells

ENGG1811 Computing for Engineers Week 6 Iteration; Sequential Algorithms; Processing Cells ENGG1811 Computing for Engineers Week 6 Iteration; Sequential Algorithms; Processing Cells ENGG1811 UNSW, CRICOS Provider No: 00098G1 W6 slide 1 Why loops in programming? Let us hear from Mark Zuckerberg

More information

Name: Pythagorean theorem February 4, 2013

Name: Pythagorean theorem February 4, 2013 Name: Pythagorean theorem February 4, 203 ) If you walk 50 yards south, then 40 yards east, and finally 20 yards north, how far are you from your starting point? Express your answer in yards. 6) At twelve

More information

Computer Graphics Fundamentals. Jon Macey

Computer Graphics Fundamentals. Jon Macey Computer Graphics Fundamentals Jon Macey jmacey@bournemouth.ac.uk http://nccastaff.bournemouth.ac.uk/jmacey/ 1 1 What is CG Fundamentals Looking at how Images (and Animations) are actually produced in

More information

Microsoft Excel XP. Intermediate

Microsoft Excel XP. Intermediate Microsoft Excel XP Intermediate Jonathan Thomas March 2006 Contents Lesson 1: Headers and Footers...1 Lesson 2: Inserting, Viewing and Deleting Cell Comments...2 Options...2 Lesson 3: Printing Comments...3

More information

Using Microsoft Word. Tables

Using Microsoft Word. Tables Using Microsoft Word are a useful way of arranging information on a page. In their simplest form, tables can be used to place information in lists. More complex tables can be used to arrange graphics on

More information

Rotated earth or when your fantasy world goes up side down

Rotated earth or when your fantasy world goes up side down Rotated earth or when your fantasy world goes up side down A couple of weeks ago there was a discussion started if Fractal Terrain 3 (FT3) can rotate our earth. http://forum.profantasy.com/comments.php?discussionid=4709&page=1

More information

SPH3U1 Lesson 05 Kinematics

SPH3U1 Lesson 05 Kinematics VECTORS IN TWO-DIMENSIONS LEARNING GOALS Students will Draw vector scale diagrams to visualize and analyze the nature of motion in a plane. Analyze motion by using scale diagrams to add vectors. Solve

More information

CSCI-1200 Data Structures Spring 2018 Lecture 7 Order Notation & Basic Recursion

CSCI-1200 Data Structures Spring 2018 Lecture 7 Order Notation & Basic Recursion CSCI-1200 Data Structures Spring 2018 Lecture 7 Order Notation & Basic Recursion Review from Lectures 5 & 6 Arrays and pointers, Pointer arithmetic and dereferencing, Types of memory ( automatic, static,

More information

ENGG1811 Computing for Engineers Week 7 Iteration; Sequential Algorithms; Strings and Built-in Functions

ENGG1811 Computing for Engineers Week 7 Iteration; Sequential Algorithms; Strings and Built-in Functions ENGG1811 Computing for Engineers Week 7 Iteration; Sequential Algorithms; Strings and Built-in Functions ENGG1811 UNSW, CRICOS Provider No: 00098G1 W7 slide 1 References Chapra (Part 2 of ENGG1811 Text)

More information

GCSE-AS Mathematics Bridging Course. Chellaston School. Dr P. Leary (KS5 Coordinator) Monday Objectives. The Equation of a Line.

GCSE-AS Mathematics Bridging Course. Chellaston School. Dr P. Leary (KS5 Coordinator) Monday Objectives. The Equation of a Line. GCSE-AS Mathematics Bridging Course Chellaston School Dr (KS5 Coordinator) Monday Objectives The Equation of a Line Surds Linear Simultaneous Equations Tuesday Objectives Factorising Quadratics & Equations

More information

Admin. How's the project coming? After these slides, read chapter 13 in your book. Quizzes will return

Admin. How's the project coming? After these slides, read chapter 13 in your book. Quizzes will return Recursion CS 1 Admin How's the project coming? After these slides, read chapter 13 in your book Yes that is out of order, but we can read it stand alone Quizzes will return Tuesday Nov 29 th see calendar

More information

Microsoft Excel 2013: Part 3 More on Formatting Cells And Worksheet Basics. To apply number formatting:

Microsoft Excel 2013: Part 3 More on Formatting Cells And Worksheet Basics. To apply number formatting: Microsoft Excel 2013: Part 3 More on Formatting Cells And Worksheet Basics Formatting text and numbers In Excel, you can apply specific formatting for text and numbers instead of displaying all cell content

More information

Intermediate Math Circles Wednesday, February 8, 2017 Graph Theory I

Intermediate Math Circles Wednesday, February 8, 2017 Graph Theory I Intermediate Math Circles Wednesday, February 8, 2017 Graph Theory I Many of you are probably familiar with the term graph. To you a graph may mean a line or curve defined by a function y = f(x). It may

More information

Unit 1, Lesson 1: Moving in the Plane

Unit 1, Lesson 1: Moving in the Plane Unit 1, Lesson 1: Moving in the Plane Let s describe ways figures can move in the plane. 1.1: Which One Doesn t Belong: Diagrams Which one doesn t belong? 1.2: Triangle Square Dance m.openup.org/1/8-1-1-2

More information

References. Parameters revisited. Reference Parameters. Example: Swapping values. Named Arguments

References. Parameters revisited. Reference Parameters. Example: Swapping values. Named Arguments References ENGG1811 Computing for Engineers Week 8 Objects and Collections; Using the Macro Recorder; Shapes Chapra (Part 2 of ENGG1811 Text) Topic 10 (chapter 3) Macro Recorder ENGG1811 UNSW, CRICOS Provider

More information

PRACTICAL GEOMETRY SYMMETRY AND VISUALISING SOLID SHAPES

PRACTICAL GEOMETRY SYMMETRY AND VISUALISING SOLID SHAPES UNIT 12 PRACTICAL GEOMETRY SYMMETRY AND VISUALISING SOLID SHAPES (A) Main Concepts and Results Let a line l and a point P not lying on it be given. By using properties of a transversal and parallel lines,

More information

Chapter 2 Assignment (due Thursday, April 19)

Chapter 2 Assignment (due Thursday, April 19) (due Thursday, April 19) Introduction: The purpose of this assignment is to analyze data sets by creating histograms and scatterplots. You will use the STATDISK program for both. Therefore, you should

More information

n! = 1 * 2 * 3 * 4 * * (n-1) * n

n! = 1 * 2 * 3 * 4 * * (n-1) * n The Beauty and Joy of Computing 1 Lab Exercise 9: Problem self-similarity and recursion Objectives By completing this lab exercise, you should learn to Recognize simple self-similar problems which are

More information

Excel Tools Features... 1 Comments... 2 List Comments Formatting... 3 Center Across... 3 Hide Blank Rows... 3 Lists... 3 Sheet Links...

Excel Tools Features... 1 Comments... 2 List Comments Formatting... 3 Center Across... 3 Hide Blank Rows... 3 Lists... 3 Sheet Links... CONTEXTURES EXCEL TOOLS FEATURES LIST PAGE 1 Excel Tools Features The following features are contained in the Excel Tools Add-in. Excel Tools Features... 1 Comments... 2 List Comments... 2 Comments...

More information

COMP1000 / Spreadsheets Week 2 Review

COMP1000 / Spreadsheets Week 2 Review / Spreadsheets Week 2 Review Plot chart Column chart/bar chart/pie chart Customize chart Chart style/labels/titles Add trendline Create table Create table/apply different style/print table Sort/filter

More information

References. Arrays. Default array bounds. Array example. Array usage. Shepherd, pp (Arrays) Shepherd, Chapters 12, 13

References. Arrays. Default array bounds. Array example. Array usage. Shepherd, pp (Arrays) Shepherd, Chapters 12, 13 ENGG1811 UNSW, CRICOS Provider No: 00098G W7 slide 1 References ENGG1811 Computing for Engineers Week 7 Arrays, Objects and Collections; Using the Macro Recorder Shepherd, pp.20-22 (Arrays) Shepherd, Chapters

More information

Workbooks (File) and Worksheet Handling

Workbooks (File) and Worksheet Handling Workbooks (File) and Worksheet Handling Excel Limitation Excel shortcut use and benefits Excel setting and custom list creation Excel Template and File location system Advanced Paste Special Calculation

More information

Civil Engineering Computation

Civil Engineering Computation Civil Engineering Computation First Steps in VBA Homework Evaluation 2 1 Homework Evaluation 3 Based on this rubric, you may resubmit Homework 1 and Homework 2 (along with today s homework) by next Monday

More information

References. Iteration For. Iteration (Repetition) Iteration While. For loop examples

References. Iteration For. Iteration (Repetition) Iteration While. For loop examples References ENGG1811 Computing for Engineers Week 7 Iteration; Sequential Algorithms; Strings and Built-in Functions Chapra (Part 2 of ENGG1811 Text) Topic 19 (chapter 12) Loops Topic 17 (section 10.1)

More information

INFORMATION FOR PARENTS AND CARERS TARGETS IN MATHEMATICS

INFORMATION FOR PARENTS AND CARERS TARGETS IN MATHEMATICS INITIAL TARGETS I can share 6 objects between 2 children. I can write and use numbers (less than 10) in role play. I can count up to 10 objects independently. I can read and write numbers to 10 independently.

More information

Excel 2007 New Features Table of Contents

Excel 2007 New Features Table of Contents Table of Contents Excel 2007 New Interface... 1 Quick Access Toolbar... 1 Minimizing the Ribbon... 1 The Office Button... 2 Format as Table Filters and Sorting... 2 Table Tools... 4 Filtering Data... 4

More information

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples:

6/14/2010. VBA program units: Subroutines and Functions. Functions: Examples: Examples: VBA program units: Subroutines and Functions Subs: a chunk of VBA code that can be executed by running it from Excel, from the VBE, or by being called by another VBA subprogram can be created with the

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Introduction This handout briefly outlines most of the basic uses and functions of Excel that we will be using in this course. Although Excel may be used for performing statistical

More information

Unit 8 Geometry I-1. Teacher s Guide for Workbook 8.1 COPYRIGHT 2010 JUMP MATH: NOT TO BE COPIED

Unit 8 Geometry I-1. Teacher s Guide for Workbook 8.1 COPYRIGHT 2010 JUMP MATH: NOT TO BE COPIED Unit 8 Geometry In this unit, students will identify and plot points in all four quadrants of the Cartesian plane, and perform and describe transformations (reflections, rotations, translations) in the

More information

Section T Similar and congruent shapes

Section T Similar and congruent shapes Section T Similar and congruent shapes Two shapes are similar if one is an enlargement of the other (even if it is in a different position and orientation). There is a constant scale factor of enlargement

More information

SPH3U1 Lesson 09 Kinematics

SPH3U1 Lesson 09 Kinematics VECTORS IN TWO-DIMENSIONS LEARNING GOALS Students will Draw vector scale diagrams to visualize and analyze the nature of motion in a plane. Analyze motion by using scale diagrams to add vectors. Solve

More information

(Refer Slide Time: 00:51)

(Refer Slide Time: 00:51) Programming, Data Structures and Algorithms Prof. Shankar Balachandran Department of Computer Science and Engineering Indian Institute Technology, Madras Module 10 E Lecture 24 Content Example: factorial

More information

Review Ch. 15 Spreadsheet and Worksheet Basics. 2010, 2006 South-Western, Cengage Learning

Review Ch. 15 Spreadsheet and Worksheet Basics. 2010, 2006 South-Western, Cengage Learning Review Ch. 15 Spreadsheet and Worksheet Basics 2010, 2006 South-Western, Cengage Learning Excel Worksheet Slide 2 Move Around a Worksheet Use the mouse and scroll bars Use and (or TAB) Use PAGE UP and

More information

Spreadsheet Warm Up for SSAC Geology of National Parks Modules, 2: Elementary Spreadsheet Manipulations and Graphing Tasks

Spreadsheet Warm Up for SSAC Geology of National Parks Modules, 2: Elementary Spreadsheet Manipulations and Graphing Tasks University of South Florida Scholar Commons Tampa Library Faculty and Staff Publications Tampa Library 2009 Spreadsheet Warm Up for SSAC Geology of National Parks Modules, 2: Elementary Spreadsheet Manipulations

More information

Math 124 Final Examination Autumn Turn off all cell phones, pagers, radios, mp3 players, and other similar devices.

Math 124 Final Examination Autumn Turn off all cell phones, pagers, radios, mp3 players, and other similar devices. Math 124 Final Examination Autumn 2016 Your Name Your Signature Student ID # Quiz Section Professor s Name TA s Name Turn off all cell phones, pagers, radios, mp3 players, and other similar devices. This

More information

Formulas Learn how to use Excel to do the math for you by typing formulas into cells.

Formulas Learn how to use Excel to do the math for you by typing formulas into cells. Microsoft Excel 2007: Part III Creating Formulas Windows XP Microsoft Excel 2007 Microsoft Excel is an electronic spreadsheet program. Electronic spreadsheet applications allow you to type, edit, and print

More information

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: ####

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: #### Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 Lab partners: Lab#1 Presentation of lab reports The first thing we do is to create page headers. In Word 2007 do the following:

More information

What we will learn in Introduction to Excel. How to Open Excel. Introduction to Excel 2010 Lodi Memorial Library NJ Developed by Barb Hauck-Mah

What we will learn in Introduction to Excel. How to Open Excel. Introduction to Excel 2010 Lodi Memorial Library NJ Developed by Barb Hauck-Mah Introduction to Excel 2010 Lodi Memorial Library NJ Developed by Barb Hauck-Mah What is Excel? It is a Microsoft Office computer software program to organize and analyze numbers, data and labels in spreadsheet

More information

Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we

Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we have to talk about the way in which we represent the

More information

26 Feb Recursion. Overview. Greatest Common Divisor. Greatest Common Divisor. Greatest Common Divisor. Greatest Common Divisor

26 Feb Recursion. Overview. Greatest Common Divisor. Greatest Common Divisor. Greatest Common Divisor. Greatest Common Divisor Overview.3 Recursion What is recursion? When one function calls itself directly or indirectly. Why learn recursion? New mode of thinking. Powerful programming paradigm. Many computations are naturally

More information

A Tutorial for Excel 2002 for Windows

A Tutorial for Excel 2002 for Windows INFORMATION SYSTEMS SERVICES Writing Formulae with Microsoft Excel 2002 A Tutorial for Excel 2002 for Windows AUTHOR: Information Systems Services DATE: August 2004 EDITION: 2.0 TUT 47 UNIVERSITY OF LEEDS

More information

1. CONVEX POLYGONS. Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D.

1. CONVEX POLYGONS. Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D. 1. CONVEX POLYGONS Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D. Convex 6 gon Another convex 6 gon Not convex Question. Why is the third

More information

Stage 1 Intermediate Revision Sheet

Stage 1 Intermediate Revision Sheet Stage 1 Intermediate Revision Sheet This document attempts to sum up the contents of the Intermediate Tier Stage 1 Module. There are two exams, each 25 minutes long. One allows use of a calculator and

More information

Statistics Case Study 2000 M. J. Clancy and M. C. Linn

Statistics Case Study 2000 M. J. Clancy and M. C. Linn Statistics Case Study 2000 M. J. Clancy and M. C. Linn Problem Write and test functions to compute the following statistics for a nonempty list of numeric values: The mean, or average value, is computed

More information

2.3 Recursion 7/23/2015 3:06:35 PM

2.3 Recursion 7/23/2015 3:06:35 PM 3 Recursion Introduction to Programming in Java: An Interdisciplinary Approach Robert Sedgewick and Kevin Wayne Copyright 2002 2010 7/23/2015 3:06:35 PM Factorial The factorial of a positive integer N

More information

In this section you will learn some simple data entry, editing, formatting techniques and some simple formulae. Contents

In this section you will learn some simple data entry, editing, formatting techniques and some simple formulae. Contents In this section you will learn some simple data entry, editing, formatting techniques and some simple formulae. Contents Section Topic Sub-topic Pages Section 2 Spreadsheets Layout and Design S2: 2 3 Formulae

More information

Microsoft Excel 2010 Training. Excel 2010 Basics

Microsoft Excel 2010 Training. Excel 2010 Basics Microsoft Excel 2010 Training Excel 2010 Basics Overview Excel is a spreadsheet, a grid made from columns and rows. It is a software program that can make number manipulation easy and somewhat painless.

More information

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010 CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010 Quick Summary A workbook an Excel document that stores data contains one or more pages called a worksheet. A worksheet or spreadsheet is stored in a workbook, and

More information

Haskell Review COMP360

Haskell Review COMP360 Haskell Review COMP360 Some people talk in their sleep. Lecturers talk while other people sleep Albert Camus Remaining Schedule Friday, April 7 Haskell Monday, April 10 Logic Programming read chapter 12

More information

Recursive Definitions

Recursive Definitions Recursion Objectives Explain the underlying concepts of recursion Examine recursive methods and unravel their processing steps Explain when recursion should and should not be used Demonstrate the use of

More information

Budget Exercise for Intermediate Excel

Budget Exercise for Intermediate Excel Budget Exercise for Intermediate Excel Follow the directions below to create a 12 month budget exercise. Read through each individual direction before performing it, like you are following recipe instructions.

More information

Chapter 13. Creating Business Diagrams with SmartArt. Creating SmartArt Diagrams

Chapter 13. Creating Business Diagrams with SmartArt. Creating SmartArt Diagrams Chapter 13 Creating Business Diagrams with SmartArt Office 2007 adds support for 80 different types of business diagrams. These diagrams include list charts, process charts, cycle charts, hierarchy and

More information

COURSE CONTENT Excel with VBA Training

COURSE CONTENT Excel with VBA Training COURSE CONTENT Excel with VBA Training MS Excel - Advance 1. Excel Quick Overview Use of Excel, its boundaries & features 2. Data Formatting & Custom setting Number, Text, Date, Currency, Custom settings.

More information

References. Parameters revisited. Reference Parameters. Example: Swapping values. Named Arguments

References. Parameters revisited. Reference Parameters. Example: Swapping values. Named Arguments References ENGG1811 Computing for Engineers Week 7 Objects and Collections; Using the Macro Recorder; Shapes Chapra (Part 2 of ENGG1811 Text) Topic 10 (chapter 3) Macro Recorder ENGG1811 UNSW, CRICOS Provider

More information

Teach Yourself Microsoft Office Excel Topic 17: Revision, Importing and Grouping Data

Teach Yourself Microsoft Office Excel Topic 17: Revision, Importing and Grouping Data www.gerrykruyer.com Teach Yourself Microsoft Office Excel Topic 17: Revision, Importing and Grouping Data In this topic we will revise several basics mainly through discussion and a few example tasks and

More information

Excel 2010 Foundation. Excel 2010 Foundation SAMPLE

Excel 2010 Foundation. Excel 2010 Foundation SAMPLE Excel 2010 Foundation Excel 2010 Foundation Excel 2010 Foundation Page 2 2010 Cheltenham Courseware Pty. Ltd. All trademarks acknowledged. E&OE. No part of this document may be copied without written permission

More information

(Refer Slide Time: 00:02:00)

(Refer Slide Time: 00:02:00) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 18 Polyfill - Scan Conversion of a Polygon Today we will discuss the concepts

More information

Intermediate Excel 2003

Intermediate Excel 2003 Intermediate Excel 2003 Introduction The aim of this document is to introduce some techniques for manipulating data within Excel, including sorting, filtering and how to customise the charts you create.

More information

Let a line l and a point P not lying on it be given. By using properties of a transversal and parallel lines, a line which passes through the point P

Let a line l and a point P not lying on it be given. By using properties of a transversal and parallel lines, a line which passes through the point P Let a line l and a point P not lying on it be given. By using properties of a transversal and parallel lines, a line which passes through the point P and parallel to l, can be drawn. A triangle can be

More information

Exploring extreme weather with Excel - The basics

Exploring extreme weather with Excel - The basics Exploring extreme weather with Excel - The basics These activities will help to develop your data skills using Excel and explore extreme weather in the UK. This activity introduces the basics of using

More information