Re: [Tutor] Statistic-Program Problems! Please Help Quickly!

2010-10-16 Thread Steven D'Aprano
On Fri, 15 Oct 2010 05:22:45 pm Vince Spicer wrote: [trim nearly 200 lines of quoted text] > You might want to look that returning data > http://docs.python.org/library/functions.html Vince, would you mind trimming your responses in future? There's no need to quote the entire conversation just t

Re: [Tutor] Statistic-Program Problems! Please Help Quickly!

2010-10-15 Thread Vince Spicer
On Thu, Oct 14, 2010 at 10:11 PM, Colleen Glaeser wrote: > BTW, the error message my program gives me for the B and M functions is: > > Traceback (most recent call last): > File "I:\Lab 7 wierd stat data.py", line 49, in > B() > File "I:\Lab 7 wierd stat data.py", line 44, in B > > ((

Re: [Tutor] Statistic-Program Problems! Please Help Quickly!

2010-10-15 Thread Steven D'Aprano
On Fri, 15 Oct 2010 03:09:57 pm Colleen Glaeser wrote: > Now, my functions for X, Y, P, and Q are correct, but I have a couple > of problems when it comes to continuing. First of all, despite what > my teacher has told me, my method for trying to multiply X,Y,P, and > Q's results in the functions

Re: [Tutor] Statistic-Program Problems! Please Help Quickly!

2010-10-14 Thread Steven D'Aprano
On Fri, 15 Oct 2010 03:09:57 pm Colleen Glaeser wrote: [...] > So far, my program is as follows: > > Data = [[3,1],[4,3],[6, 4],[7, 6],[8, 8],[9, 8]] > > def X(): > accX = 0 > for item in Data: > [x,y] = item > accX = accX + x > print (accX) I see four problems with thi

Re: [Tutor] Statistic-Program Problems! Please Help Quickly!

2010-10-14 Thread Alan Gauld
"Colleen Glaeser" wrote I am in a beginning-level computer science class in college and am running into problems with an assignment. Because its homework we can't give you a fiull solution but can give hints so... The regression line is then given by where m and b may be obtained by

Re: [Tutor] Statistic-Program Problems! Please Help Quickly!

2010-10-14 Thread Colleen Glaeser
BTW, the error message my program gives me for the B and M functions is: Traceback (most recent call last): File "I:\Lab 7 wierd stat data.py", line 49, in B() File "I:\Lab 7 wierd stat data.py", line 44, in B ((Y() * Q()) - (P() * X())) / ((6 * Q()) - (X()**2)) TypeError: unsupported

[Tutor] Statistic-Program Problems! Please Help Quickly!

2010-10-14 Thread Colleen Glaeser
Dear tutors, I am in a beginning-level computer science class in college and am running into problems with an assignment. The assignment is as follows: Statisticians are fond of drawing regression lines. In statistics and other fields where people analyze lots of data, one of the most commonly