Touchdevelop- prompt for the accuracy value

Assignment Help Computer Engineering
Reference no: EM13753196

Write a mobile app (using TouchDevelop) that calculates the sum (which computes e×) of n + 1 terms as

sum = 1 + x/ 1! + /2! + / 3! + /4! + ...

Values x and n should be read (prompted to enter). Calculate each sequential term base on the previous one to get the best calculation performance (so, the next one = the previous term * (x / i) where i the current control variable - index). Don't use the math function. Use only one loop. The output should be in the table format as follows (remember to use the reverse wall order shown in class):

x = ?, n = ?

iteration # termValue sum
...
Example:

x = 1, n = 2

iteration # termValue sum

1 1 2

2 0.5 2.5

e× = 2.71828..., where x = 1

Each row corresponds to values in each iteration except the last row which should give the final result in the text box (see p.38 ch3 of our text [3] and also the last exercise in class). A very last line of the output should give the return value of e× from the formula exp(x : Number) : Number (see p.186 of our text).

Test for x = 1, n = 5 and n = 10 - the expected result should be better for n = 10 and you will expect the sum around 2.71828.... Next test for x = 2, n = 5, and n = 10.

Create a 2nd loop the sum s until the sequential term is less than accuracy. Prompt for the accuracy value. Test for accuracy 0.01, 0.001 and 0.0001. Provide a flowchart.

screenshots of at least four (4) sets of sample inputs (test cases). This time a flowchart is treated.

Reference no: EM13753196

Questions Cloud

Internet security and network neutrality : Compose an executive summary highlighting the paper's contents and reasoning for your chosen topic. Internet Security and Network Neutrality
Complexities of the us financial system : The U.S. financial system has many complexities, and it is impacted by several environmental factors, including federal regulations and the economy.
Analysis of operating activities : Explain the concepts of income measurement and their implications for analysis of operating activities Describe ways to analyze revenue and expense recognition and discuss possible risks for financial analysis
Businesses to engage in international business : 8. Create 3 businesses to engage in international business with your country. The first business should be an example of trade: describe a new, foreign firm in your country that is based on exporting or importing. The next 2 businesses should be exam..
Touchdevelop- prompt for the accuracy value : Create a 2nd loop the sum s until the sequential term is less than accuracy. Prompt for the accuracy value. Test for accuracy 0.01, 0.001 and 0.0001. Provide a flowchart.
Write paper on using quality control tools : Prepare a 3-page APA formatted paper on using quality control tools.
Compare john locke and rousseaus view of social contract : Compare and Contrast John Locke and Rousseau's views of the state of nature and the nature of the social contract. Which elements of human nature does each author stress?
Double-declining balance method : A machine which cost $300,000 is acquired on October 1, 2014. Its estimated salvage value is $30,000 and its expected life is 8 years. Calculate depreciation expense for 2014 and 2015 by the double-declining balance method. Show all figures used and ..
Describe what action the organization should take : Mark works for the Wonder Mattress Company in the IS department. He is in charge of looking at new technologies that come on the market and determining if they can be used for the company. A recommendation of what action the organization should tak..

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