Compute a sequence of approximations of e

Assignment Help Computer Engineering
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

Reference no: EM131097542

Questions Cloud

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 ..

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd