Compute the number pi by summing the first n terms

Assignment Help Python Programming
Reference no: EM132360889

Question

You need help on programming pi using a formula. Write a function pisum(n) that receives an integer n as input and computes the number Pi by summing the first n terms of the following exponential sum:
i.1415907698497954

In other words, pisum(0) will compute and return 3, pisum(1) will compute and return 3+1/6 = 3.1666 .., and so forth. This formula was discovered by the Indian mathematician Kelallur Nilakantha Somayaji in 1501.

Reference no: EM132360889

Questions Cloud

Discuss the importance of their role as advocate : Choose one legislator on the state or federal level who is also a nurse, and discuss the importance of their role as advocate for improving health care delivery
Write a program which takes as input n and outputs the nth : Find the sum of all numbers between 1 and 40 which are not multipes of 3; Write a program which takes as input n and outputs the nth Fibonacci number.
How you would assess the reproductive system : Give a brief description how you would assess the reproductive system of a male or female patient, young adult, middle age, or older patient (choose).
Main functions of your proposed information system : The CEO's Challenge. Identify the main functions of your proposed information system and why they are important to the business.
Compute the number pi by summing the first n terms : Write a function pisum(n) that receives an integer n as input and computes the number Pi by summing the first n terms of the following exponential sum.
What factors are important to ongoing team dynamics : What factors are important to ongoing team dynamics? Describe guidelines to evaluate the function and productivity of teams.
Strategies would you try to if you were in todd situation : What strategies would you try to if you were in Todd's situation.
Design the appropriate accessor and mutator methods : he day shift is shift 1 and the night shift is shift 2. Design the appropriate accessor and mutator methods for each class.
How the role will impact patient outcomes : The elevator door opens; you step on and find yourself face to face with a known skeptical colleague, who inquires "what are you doing in your profession"?

Reviews

Write a Review

Python Programming Questions & Answers

  Write the python statements to input the price of an article

Write the Python statements to input the price of an article. Apply a 6% sales tax to the price. Output the total price of the article, formatting

  Make automobile class that will be used by a dealership

Make automobile class that will be used by a dealership as a vehicle inventory program. The following attributes should be present in your automobile class.

  Program to do the enciphering

Write a program to do the enciphering. It should prompt the user for a message, and print out both the entered message and its corresponding ciphertext.

  Extending caesar cypher into a full-fledged password saver

Extending the Caesar cypher into a full-fledged password saver - highly recommend you revert back to the original source code

  Write the statement needed to find out how many prime number

Assume a variable n has been associated with positive integer. Write the statements needed to find out how many prime numbers.

  Display projected semester tuition amount for the next years

Write a program with a loop that displays the projected semester tuition amount for the next 5 years. The program should print out the result in the form.

  Organise and present a data analysis report

Develop creative approaches to solving the wrangling/analysis problems - Apply relevant Python programming concepts to a data analysis challenge

  Draw a flowchart that presents the steps of the algorithm

Perform some basic data analysis on a dataset obtained from Gapminder project. Gapminder collects authentic facts and statistics of all countries worldwide

  Write a program that generates two integers

Write a program that generates two integers under 100, show them on screen, and prompts the user to enter the sum of these two integers. The program then reports true if the answer is correct, false otherwise.

  The integers should be printed in order with addresses

The integers should be printed in order with addresses from main. When the steps of the function order have been completed the smallest value will be stored in a, the middle in b, and the largest in c.

  Find in the dataset how often u2 is mentioned as artist

Write and run Hadoop code (mappers and reducers) to find in the Last.fm dataset (a) how often U2 is mentioned as artist and (b) songs that have been played more than 600 million times.

  Write a test program to test your new queue

Write a test program to test your new queue. Be sure to include enough code to test all the methods and write the code in such a way that whoever is looking.

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