CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University October 6-10, 2008 ©By the author. All rights reserved.

Slides:



Advertisements
Similar presentations
CS122 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter 2010.
Advertisements

Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily quiz will be given at the.
Please open your laptops, log in to the MyMathLab course web site, and open Daily Quiz 16. IMPORTANT NOTE: If you have time left out of your five minutes.
Please open your laptops, log in to the MyMathLab course web site, and open Quiz 5.5A. You may use the formula sheet on this quiz – please don’t write.
Math 010 online work that was due today at the start of class:
PLEASE HELP US OUT WITH THIS: When you go to the open lab next door in 203, please make sure you sign in on the log sheet and enter your instructor’s.
Please close your laptops and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily homework quiz will be given.
Please open your laptops, log in to the MyMathLab course web site, and open Quiz 1.3B/2.1. No calculators or notes can be used on this quiz. Write your.
Please open your laptops, log in to the MyMathLab course web site, and open Quiz 5.3/4. You may use the formula sheet on this quiz – please don’t write.
Python Programming, 2/e1 Python Programming: An Introduction to Computer Science Chapter 3 Computing with Numbers.
CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Spring 2010.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Please open Daily Quiz 34. A scientific calculator may be used on this quiz. You can keep your yellow formula sheets out when you take the quiz. Remember.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University January 5-9, 2009 ©By the author. All rights reserved.
CS 122 Engineering Computation Lab Lab 2 Dan De Sousa and Tim Cheeseman Department of Computer Science Drexel University April 2009 ©By the author. All.
CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and.
Bell Work3/23/15 Define the following : – Accuracy – Precision – Scientific Notation.
CS190/295 Programming in Python for Life Sciences: Lecture 3 Instructor: Xiaohui Xie University of California, Irvine.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 4 Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission is.
CS123 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Spring 2010.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne – Web Page -
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Summer, 2009 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Fall 2009 ©By the author. All rights reserved. Permission.
CS 123 Engineering Computation Lab Lab 2 Dan De Sousa and Bruce Char Department of Computer Science Drexel University April 2009 ©By the author. All rights.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
CS122/CS123 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Summer 2011.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 3.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note- taking materials.
CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2010.
CPSC 203 Introduction to Computers T43, T46 & T68 TA: Jie (Jeff) Gao.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
Overview of c++ Objectives 1. Understanding the use of the following elements in a c++ program variables constants assignment input output 2. Writing a.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 3 Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission is.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Winter, 2011 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2012 ©By the author. All rights reserved. Permission.
CS 122 Engineering Computation Lab Lab 4 Dan De Sousa and Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights.
Pre Class: Thu ID in the cart and get your laptop. Username: Student Password: Student. Work on “A Hands on Study”. And “Don’t.
CS 123 Computational Lab IIl Spring 2008 Department of Computer Science Drexel University Copyright by the authors. Permission is given for students and.
29 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Math 010 online work that was due today at the start of class: Section 1.3A Online Homework.
1. PLEASE HELP US OUT WITH THIS: When you go to the open lab next door in 203, please make sure you sign in on the log sheet and enter your instructor’s.
CS 121 Engineering Computation Lab Lab 4 Bruce Char Department of Computer Science Drexel University Fall 2010 ©By the author. All rights reserved. Permission.
CS123 Engineering Computation Lab Lab 3 Bruce Char Department of Computer Science Drexel University Spring 2011.
CS 121 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Winter, 2011 ©By the author. All rights reserved.
CS 121 Engineering Computation Lab Lab 4 Department of Computer Science Drexel University February 16-20, 2008 ©By the author. All rights reserved. Permission.
Welcome to MM150! Unit 1 Seminar To resize your pods: Place your mouse here. Left mouse click and hold. Drag to the right to enlarge the pod. To maximize.
CS123 Engineering Computation Lab Lab 1 Bruce Char Department of Computer Science Drexel University Spring 2013.
CS 122 Engineering Computation Lab Lab1 Bruce Char Department of Computer Science Drexel University Summer 2009 ©By the author. All rights reserved. Permission.
CS 122/CS123 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Summer 2011 ©By the author. All rights reserved.
CS 115 Lecture 5 Math library; building a project Taken from notes by Dr. Neil Moore.
CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University Fall 2011 ©By the author. All rights reserved. Permission.
EET 2259 Unit 13 Strings and File I/O
CS 121 Engineering Computation Lab Lab 5
CS 121 Engineering Computation Lab Lab 3
CS 121 Engineering Computation Lab Lab 2
CS123 Engineering Computation Lab Lab 4
Introduction to Programming
Introduction to Mathcad
CS 121 Engineering Computation Lab Lab 3
CS190/295 Programming in Python for Life Sciences: Lecture 3
EET 2259 Unit 13 Strings and File I/O
Intro to Computer Science CS1510 Dr. Sarah Diesburg
Presentation transcript:

CS 121 Engineering Computation Lab Lab 2 Bruce Char Department of Computer Science Drexel University October 6-10, 2008 ©By the author. All rights reserved. Permission is given to CS121 Fall 2008 staff and students to use and reproduce these notes for their own use.

Your class instructor and TA Instructor for this section: Your TAs are: Note that verification sheet requires you to put down instructor’s name.

Week 1 and 2 retrospective Lab 1: first week Make up of Lab 1, Monday of second week Quiz 1: second week Quiz 1 (mercy version) ends 9pm Monday of third week. Office hours in CLC all day Monday. If you are a latecomer and are catching up? Talk to instructor!

Lab 2 Overview Part 1 Limited precision numbers(ch. 3 readings) Part 2 Data structures, functions (ch. 4 readings)

Limited precision arithmetic Limited precision arithmetic: use 10 digits (or some other fixed number such as 20). Perform an operation using as many decimal digits as necessary. Round the result to 10 decimal digits. Do the next limited precision arithmetic operation. Repeat until all the operations are done.

Adding and in 5 digit limited precision arithmetic : ________ exact answer rounded to five digits (final result)

Five digit limited precision in Maple

Ten digit limited precision arithmetic is Maple’s default (no evalf necessary)

Exact arithmetic is not the same as limited precision arithmetic Exact arithmetic always works things out to exactly. Operations between integers stay as exact integers. Operations with fractions stay as exact fractions.

Two kinds of arithmetic Maple does exact arithmetic with exact numbers Maple does limited precision arithmetic with limited precision numbers. How does Maple know what to do with a number? By the way it looks. –Numbers with decimal points, :”e’ exponents are limited precision numbers –Numbers that are integers or ratios of integers without decimal points are exact numbers. –Symbolic constants are also considered exact numbers.

Floating Point Numbers Having a decimal point written with them Considered as limited-precision numbers in Maple Answers are rounded to the number of digits of accuracy e.g. –1111.1, meaning the limited-precision version with 5 digit numbers

“e” notation Scientific notation using “e” to indicate the exponent Considered as limited-precision numbers in Maple Do not use “e” for logarithms from the palette, but type the letter e on the keyboard normally e.g.: –7e11, meaning 7*10 11 –2e-8, meaning 2*10 -8

How do you convert an exact number into an approximate number? Clickable Approximate->20 evalf( expr) or evalf(expr,digits )

Bonus (not mentioned in chapter readings): how do you convert an approximate number into an exact number?

Maple as a math word processor (sect 4.1, 4.4.5, 4.4.6) Ordinary entry is 2D Math mode Can enter text. Once in text mode, can do boldface, italics, center-justification as with a word processor. Control-T/Control-R (Command-T/Command-R) to switch between the two. When in doubt click cursor on position, then do Format -> Create Document Block. Switch to proper mode and start typing.

Demo of Math text entry Demo of word processing. Demo of Greek letters (section 4.4.6), math constants, subscripts in math mode.

Assignment, labels (sect 4.2) Hitting enter (return) gives a result a numerical label. Control-L (command-L) to refer to a result by its label. name := expression –Is similar – turns that into a label for the result of evaluating the expression. Both are useful when you want to refer to results in later steps of a calculation.

Demo of assignments and labels Replace with demo of assignment and labeling at work.

Functions (Sect 4.4) Function name ( input ) produces an output. Most math functions take one numerical input and produce one numerical output. Some math functions take two numerical inputs and produce one numerical output. Maple functions do this and more: sometimes the inputs and outputs are not numbers.

Function demo Demo textual entry of: –Sqrt, exp, abs, sin, cos, min, max

Maple has “non math” functions (sect 4.4.7) function name( input1, input2, … ) with output. Inputs and outputs do not have to be numbers.

Demo of non-Math functions Demo of solve, factor,eval, plot

Finishing up – save files Make sure your name/user id/section number/ date,time/instructor name are on the verification sheet. Get the verification sheet signed and handed in. Save worksheet on desktop if you haven’t done so already. You can call the file “MyLab1”. This will create a file called MyLab1.mw. Opens on any machine running Maple 12. Submit a copy to Blackboard site as evidence that you did the lab. This is not required but can help you later. a copy to yourself and/or your lab partners as an attachment so you can look at what you did for review purposes later.

Weeks 3 and 4 Did you enter in week 2? –Talk to the instructor during their office hours about catching up with missed material. Take Quiz 2 Monday-Friday Week 4 –October –Maple TA server down for maintenance 9- 10am and briefly at 3pm Look for Chapter 5,6 released at end of Week 4