Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python.': 0.02; 'algorithm': 0.03; 'variables.': 0.07; 'subject:How': 0.09; 'subject:would': 0.09; 'formula': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'variable.': 0.16; 'wrote:': 0.17; 'math': 0.20; 'translate': 0.20; 'python?': 0.20; 'header :In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'represent': 0.28; 'run': 0.28; 'basic': 0.30; 'to:addr:python-list': 0.33; 'pm,': 0.35; 'subject:?': 0.35; 'received:org': 0.36; 'message- id:@gmail.com': 0.36; 'subject:: ': 0.38; 'store': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'your': 0.60; 'course.': 0.62; 'subject:this': 0.84; 'subject:you': 0.88; 'eli': 0.93 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Wed, 27 Feb 2013 23:52:43 -0700 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: How would you do this? References: <0318f314-91e5-472a-a664-054ca7ea5097@googlegroups.com> In-Reply-To: <0318f314-91e5-472a-a664-054ca7ea5097@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362034371 news.xs4all.nl 6864 [2001:888:2000:d::a6]:54074 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40116 On 02/27/2013 08:32 PM, eli m wrote: > How would you find the slope, y intercept, and slope-intercept form > equation for a line in python? Well, how do you do it by hand? Once you have the basic formula or algorithm down, just translate it into python. Math is math. We can answer specific questions of course. Like, how would I represent the equation in python? Well put each term in a variable. For example, 3x^2-2x+4 = 0, you would store the 3, 2, and 4 in variables. Then run your formula on them.