EGR 103/Fall 2019/Lab 5

From PrattWiki
Jump to navigation Jump to search

Errors / Additions

None yet!

5.1 Introduction

The main purpose of this lab will be to look at debugging, loading data from files, and using Chapra Figure 4.2. There is also some string manipulation - and there used to be turtles by turtles and spyder don't play nice together...

5.2 Resources

See main EGR 103 page for links to these

5.3 Getting Started

Same as it ever was.

5.4 Ungraded

These problems are good ones to look at and to solve but are not a part of the graded work. Given that, you can absolutely consult with classmates about how to get the answers to these ungraded problems but you may not share those answers outside of the members of the class.

5.5 Useful Information

String and List Functions

This section discusses some of the most common functions applied to strings or to lists.

Debugging Introduction

See the videos at:

We will also go through debugging in lab.

5.6 Assignment

5.6.1

This problem takes you step by step through developing the code. Pay careful attention to the tests it recommends that you run. Put those tests in your script either in a main() function that gets called or in a selective executable based on whether __name__ is "__main__". Also look at the test code - make sure you understand what it is doing and how it works.

5.6.2

This is similar to 5.6.1. Including the part about looking at the test code and seeing how it works.

5.6.3

For this one, you will be making changes to an extended version of the Chapra 4.2 code in order to use accumulation to estimate values of cosine. It is very similar to using an accumulation to estimate values of the exponential.

5.6.4

For this one, you will be making changes to either the original or extended version of Chapra 4.2 in order to use a mapping to estimate roots of a function. It is very similar to using the Newton method mapping to estimate values of a square root. Note - though the mapping for the lab assignment comes from the Newton-Raphson, it origin is different from the Newton method discussed in class for finding a square root.

Class Document Protection