Write a mobile app

Assignment Help Basic Computer Science
Reference no: EM13753667

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.

Reference no: EM13753667

Questions Cloud

What problems nation experience in articles of confederation : What problems did the new nation experience under the Articles of Confederation? Why did these problems develop?
Compare and contrast the major determinants of healthcare : Analyze the current health care delivery structure in your state. Compare and contrast the major determinants of healthcare market power.
How do commercial banks and federal banks create money : What are the uses of money? How do commercial banks and Federal banks create money? Is monetary policy conducted independently in the United States? Explain your answer. Is it important for monetary policy to remain independent from all parties? W..
Write a paper about rise of islamic empires : Write a paper about rise of Islamic Empires and expansion of Europe into these Islamic Empires.
Write a mobile app : Write a mobile app (using TouchDevelop) that calculates the sum (which computes e×) of n + 1 terms as
How do effects of tariffs differ from effects of quotas : Who gains and who loses from a tariff? How do the effects of tariffs differ from the effects of quotas? If you were a small country, what would you rather utilize? 200 word answer
What are visitors really buying : What is Las Vegas selling? What are visitors really buying? Discuss these questions in terms of the core benefit actual product, and augmented product levels
Write the subsequent demand equation : Write the subsequent demand equation, with Qd as the dependent variable; Price, Advertising, Product Development, and Rel Price as the independent variables - Classify the relationship between these products as complements or substitutes. The form..
Briefly define lyndon b johnsons idea of the great society : Briefly define Lyndon B. Johnson's idea of "The Great Society" and then discuss the controversy over it.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What would be the best choice of the degree

A B+ - tree index is to be built on the name attribute of the relation student

  The rmo csms domain model class diagram

The RMO CSMS domain model class diagram

  Determine if a string is a palindrome

Using the stack and queue class, determine if a string is a palindrome. A palindrome is a string (empty to many sentences) that reads the same forwards and backwards.

  Draw a production system

Suppose that you must perform three tasks, X, Y, and Z. You can only do one task at a time, and once that task is done, you never redo it.

  What is the asymptotic complexity of the following function

What is the asymptotic complexity of the following function and how did you arrive to this answer.

  Find a better predictor for sequence

Find a better predictor for sequence and perform the DPCM again and find the real tag for the sequence.

  Learn the combined use of timer and the tracking of user

Lab 10 - The Student Game - Learn the Combined use of Timer and the tracking of user interactions Deliverables app.java, myJFrame.java, myJPanel.java, and other necessary Java files

  Write a php script that computes the total cost

Write a PHP script that computes the total cost of the ordered light bulbs from above after adding 6.2 percent sales tax. The program must inform the buyer of exactly what was ordered, in a table.

  The human resources server to the payroll server

The human resources server to the payroll server?

  Compare and contrast the us health care system with that

compare and contrast the u.s. health care system with that of another country. what are some of the major advantages

  Which structure best for the storyboard created

Case 2-3 Michael wants to create a Website based on his famous cooking show. He would like to provide instructions on how to create some of his favorite dishes. He would like his recipes to be displayed in very simple, step by step pages. Which st..

  Explaining firewalls and virus protection software

Lots of people who connect their systems to the Internet rush out and purchase latest copies of firewalls and virus protection software.

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