Reference no: EM131097542
E19: Numerical Methods for Engineering Applications Spring 2016 - HOMEWORK 1
Q1. Approximation of e to 4 digits of accuracy
The Maclaurin expansion of ex is given by
ex = 1 + x + x2/2! + x3/3! + x4/4! + . . .
Compute a sequence of approximations of e (using x = 1) until the approximate relative error εa is small enough to guarantee at least four significant digits of precision. Submit a table showing each estimate along with the approximate relative errors (for all but the first estimate).
Q2. Programming exercises
This question is to get you thinking about programming in Python in case you're just starting out, or it's been a while. If you're feeling comfortable with Python and you want to try something different you may work out solutions to any two Project Euler problems (see https://projecteuler.net/) you have not yet completed instead of doing the exercises below.
On the course website, I've posted two Python programs, guess1.py and guess2.py. Your goal is to modify the programs to obey these guidelines:
- Modify both programs so that the guesser is limited to a maximum of 7 guesses, and have the program print out which guess is being made (i.e. 1 to 7). Use a for loop to limit the guesses, and use a break statement to exit the loop when the number has been guessed correctly.
- Modify guess1.py so that the computer tells the user whether their guess is too high or too low, instead of whether it is correct or incorrect.
- Modify guess2.py so that the user can tell the computer whether its guess is too high, too low, or correct by entering the letters h, l, or c, and have the computer implement an intelligent strategy for guessing based on the feedback. If you need strategy help, read this: https://en.wikipedia.org/wiki/Binary_search_algorithm.
- Optional: make your modified guess2.py program print out an angry message if the user is found to be cheating.
Attachment:- Assignments.zip
How could the u.s. apply the selected concepts
: How could the U.S. apply the selected concepts to improve their own homeland security systems? Explain and be specific - How could these concepts have been applied to recent terrorist attacks or natural disasters?
|
Alphabetical order of firstname
: You are creating a list of Customers (from the Customer table in Workshop 02) and you wish for that list to be in reverse alphabetical order of LastName, and alphabetical order of FirstName such at Jones, Ben will appear in the list before Jones, ..
|
Data recording murdoch students
: A relation that contains data recording Murdoch students' performance in units, has the following attributes: (StudentNumber, StudentName, UnitCode, Year, Semester, Grade, Mark).
|
Evaluation of smucker business
: What is your evaluation of Smucker's business lineup and its acquisitions since 2002? How attractive is the processed foods industry? How strongly positioned are the company's brands in each segment of the industry?
|
Compute a sequence of approximations of e
: E19: Numerical Methods for Engineering Applications Spring 2016 - HOMEWORK 1. Compute a sequence of approximations of e (using x = 1) until the approximate relative error εa is small enough to guarantee at least four significant digits of precision
|
Smucker company corporate strategy
: What is J. M. Smucker Company's corporate strategy? What common strategy elements are shared across its brands? Did it make sense for Smuckers to expand its business lineup beyond jams, jellies, and preserves? Why or why not?
|
What is the total number of host ip addresses required
: How many "subnet bits" are required? How many hosts/subnet are useable? What is the total number of HOST IP Addresses required? What is the total number of SUBNET IP Addresses required? What is the required SUBNET MASK (Show work)?
|
Number with the appropriate month
: Write a program that prompts & accepts a number between 1 and 12. After getting the input, display the number with the appropriate month, show a short description of the month sought Example:
|
Questionnaire and interview skills
: For this exercise, place yourself in the shoes of someone who has been tasked to improve the workstation of an administrative assistant, like Beth. To practice your questionnaire and interview skills, develop a set of 10 questions that will allow ..
|