Path: csiph.com!usenet.pasdenom.info!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.09; 'lost.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'suggest': 0.11; 'expects': 0.16; 'formula': 0.16; 'hint:': 0.16; 'homework...': 0.16; 'integers.': 0.16; 'iteration': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subtraction': 0.16; 'example.': 0.17; 'odd': 0.17; 'feb': 0.19; 'skip:p 30': 0.20; 'equivalent': 0.20; 'subject:problem': 0.22; "we'd": 0.24; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; 'went': 0.28; 'preceding': 0.29; "i'm": 0.29; 'normally': 0.30; 'figure': 0.30; 'computing': 0.32; 'print': 0.32; 'says': 0.33; 'url:home': 0.33; 'to:addr:python- list': 0.33; 'thanks': 0.34; 'table': 0.35; 'received:org': 0.36; "i'll": 0.36; 'charset:us-ascii': 0.36; 'two': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'help': 0.40; 'your': 0.60; 'first': 0.61; 'helps': 0.63; 'series': 0.63; 'perfect': 0.63; 'email addr:gmail.com': 0.63; 'show': 0.63; 'sum': 0.66; 'asap': 0.71; '2013': 0.84; 'dennis': 0.91; 'received:108': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Python problem Date: Tue, 19 Feb 2013 23:10:02 -0500 Organization: > Bestiaria Support Staff < References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-219-19.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1361333412 news.xs4all.nl 6870 [2001:888:2000:d::a6]:34159 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:39309 On Tue, 19 Feb 2013 19:01:53 -0800 (PST), ach360@gmail.com declaimed the following in gmane.comp.python.general: > I'm so lost. Given the formula pi=4-4/3+4/5-4/7+4/9-4/11+...... How do I print a table showing approximate value of pi by computing one term4-4/3 then two terms4-4/3+4/5, and so on.Then how many terms of the series before I get 3.14, 3.141, 3.1415, 3.14159. Please helps computer teacher literally says figure it out and doesn't help and expects a perfect program.this is in python 3 please give an answer I can understand and an example. > Thanks :) :) > I need this right now. > Thanks for your time. > > I need this ASAP It is homework... No one will give you an answer... Normally we'd ask you to show use what you have tried, and we'd try to suggest where you went wrong. I'll give you five hints... HINT: The first term of the equation is equivalent to 4/1 HINT: The denominators are odd integers. HINT: Each iteration is adding 4/ to the preceding sum HINT: Subtraction is the addition of a negative value HINT: Each "even" term is a subtraction -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/