Re: How do I calculate a mean with python?

2013-09-17 Thread Travis Griggs
On Sep 16, 2013, at 4:33 PM, William Bryant gogobe...@gmail.com wrote: Hey I am new to python so go easy, but I wanted to know how to make a program that calculates the maen. List = [15, 6, 6, 7, 8, 9, 40] def mean(): global themean, thesum for i in List: thecount =

Re: How do I calculate a mean with python?

2013-09-17 Thread William Bryant
'''#*''' #* Name:Mode-Median-Mean Calculator *# #**# #* Purpose: To calculate the mode, median and mean

Re: How do I calculate a mean with python?

2013-09-17 Thread William Bryant
Ok I think I've fixed it thanks I read everything. '''**''' #* Name:Mode-Median-Mean Calculator *# #**# #*

Re: How do I calculate a mean with python?

2013-09-17 Thread William Bryant
Sorry guys, I didn't read anything u said. Because I just figured it out on my own :) I'll read it now. But u can check out my program I have done so far (It works but I think it needs some tidying up.) :) Thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I calculate a mean with python?

2013-09-17 Thread Joel Goldstick
On Tue, Sep 17, 2013 at 4:10 PM, William Bryant gogobe...@gmail.com wrote: Ok I think I've fixed it thanks I read everything. '''**''' #* Name:Mode-Median-Mean Calculator *# #* *# #* Purpose: To

Re: How do I calculate a mean with python?

2013-09-17 Thread MRAB
On 17/09/2013 21:10, William Bryant wrote: Ok I think I've fixed it thanks I read everything. [snip] def HMNs(): global TheStr, user_inputHMNs, List_input, List user_inputHMNs = input(You picked string. This program cannot calculate the mean or median, but it can calculate the

Re: How do I calculate a mean with python?

2013-09-17 Thread William Bryant
Thanks to all and @Joel Goldstick, I am learning python through youtube. They explained Global and Local variables to me. :) Thanks for that critisism, it really helps. I am 13 years old and I am looking forward to studing programming in University! :DD --

Re: How do I calculate a mean with python?

2013-09-17 Thread Joel Goldstick
On Tue, Sep 17, 2013 at 5:31 PM, William Bryant gogobe...@gmail.com wrote: Thanks to all and @Joel Goldstick, I am learning python through youtube. They explained Global and Local variables to me. :) Thanks for that critisism, it really helps. I am 13 years old and I am looking forward to

Re: How do I calculate a mean with python?

2013-09-17 Thread Bryan Britten
William - I'm also self-teaching myself Python and get stuck quite often, so I understand both the thrill of programming and the frustration. Given your young age and presumably very little exposure to other programming languages, I would highly recommend you check out

How do I calculate a mean with python?

2013-09-16 Thread William Bryant
Hey I am new to python so go easy, but I wanted to know how to make a program that calculates the maen. List = [15, 6, 6, 7, 8, 9, 40] def mean(): global themean, thesum for i in List: thecount = List.count(i) thesum = sum(List) themean = thesum / thecount Why

Re: How do I calculate a mean with python?

2013-09-16 Thread Jugurtha Hadjar
On 09/17/2013 12:33 AM, William Bryant wrote: Hey I am new to python so go easy, but I wanted to know how to make a program that calculates the maen. List = [15, 6, 6, 7, 8, 9, 40] def mean(): global themean, thesum for i in List: thecount = List.count(i) thesum =

Re: How do I calculate a mean with python?

2013-09-16 Thread Steven D'Aprano
On Mon, 16 Sep 2013 16:33:35 -0700, William Bryant wrote: Hey I am new to python so go easy, but I wanted to know how to make a program that calculates the maen. List = [15, 6, 6, 7, 8, 9, 40] def mean(): global themean, thesum for i in List: thecount = List.count(i)

Re: How do I calculate a mean with python?

2013-09-16 Thread MRAB
On 17/09/2013 00:33, William Bryant wrote: Hey I am new to python so go easy, but I wanted to know how to make a program that calculates the maen. List = [15, 6, 6, 7, 8, 9, 40] def mean(): global themean, thesum You're iterating through every number in the list... for i in List:

Re: How do I calculate a mean with python?

2013-09-16 Thread Jugurtha Hadjar
On 09/17/2013 12:33 AM, William Bryant wrote: Hey I am new to python so go easy, but I wanted to know how to make a program that calculates the maen. List = [15, 6, 6, 7, 8, 9, 40] def mean(): global themean, thesum for i in List: thecount = List.count(i) thesum =

Re: How do I calculate a mean with python?

2013-09-16 Thread Cameron Simpson
On 16Sep2013 16:33, William Bryant gogobe...@gmail.com wrote: | Hey I am new to python so go easy, but I wanted to know how to make a program that calculates the maen. | | List = [15, 6, 6, 7, 8, 9, 40] | def mean(): | global themean, thesum | for i in List: | thecount =

Re: How do I calculate a mean with python?

2013-09-16 Thread Dave Angel
On 16/9/2013 19:33, William Bryant wrote: Hey I am new to python so go easy, but I wanted to know how to make a program that calculates the maen. List = [15, 6, 6, 7, 8, 9, 40] def mean(): global themean, thesum for i in List: thecount = List.count(i) thesum =