On 11/04/13 07:08, Arijit Ukil wrote:
> Thanks for the help. Now I have modifed the code as:
>
> import sys
>
> def main(argv):
> data = int(sys.argv[1])
> avg = average (data)
> print "Average:", avg
>
> def average(num_list):
> return sum(num_list)/len(num_list)
Note that in
On 11/04/13 07:08, Arijit Ukil wrote:
Thanks for the help. Now I have modifed the code as:
import sys
def main(argv):
data = int(sys.argv[1])
avg = average (data)
print "Average:", avg
def average(num_list):
return sum(num_list)/len(num_list)
if __name__ == "__main__":
On Thu, Apr 11, 2013 at 11:38 AM, Arijit Ukil wrote:
> Thanks for the help. Now I have modifed the code as:
>
> import sys
>
> def main(argv):
>
> data = int(sys.argv[1])
>
> avg = average (data)
>
> print "Average:", avg
>
> def average(num_list):
> return sum(num_list)/len(num_l
: http://www.tcs.com
Experience certainty. IT Services
Business Solutions
Outsourcing
From:
Alan Gauld
To:
tutor@python.org
Date:
04/10/2013 10:58 PM
Subject:
Re: [Tutor] Running python from windows co
On 10/04/13 13:32, Arijit Ukil wrote:
I like to run a python program "my_python.py" from windows command
prompt. This program ( a function called testing) takes input as block
data (say data = [1,2,3,4] and outputs processed single data.
Hopefully the code below is not your entire program. If
On Wed, Apr 10, 2013 at 8:32 AM, Arijit Ukil wrote:
>
> python my_python.py 1 3 2
Adding Python's installation directory to PATH is for starting the
interpreter with specific options (-O, -vv, etc), running a module on
Python's sys.path (-m), running a command (-c), or starting an
interactive sh
On 04/10/2013 08:32 AM, Arijit Ukil wrote:
I like to run a python program "my_python.py" from windows command
prompt. This program ( a function called testing) takes input as block
data (say data = [1,2,3,4] and outputs processed single data.
import math
def avrg(data):
return sum(data)/len
On Wed, Apr 10, 2013 at 10:32 PM, Arijit Ukil wrote:
> I like to run a python program "my_python.py" from windows command prompt.
> This program ( a function called testing) takes input as block data (say
> data = [1,2,3,4] and outputs processed single data.
>
> import math
>
> def avrg(data):
>
On Wed, Apr 10, 2013 at 10:32 PM, Arijit Ukil wrote:
> I like to run a python program "my_python.py" from windows command prompt.
> This program ( a function called testing) takes input as block data (say
> data = [1,2,3,4] and outputs processed single data.
>
> import math
>
> def avrg(data):
>
I like to run a python program "my_python.py" from windows command prompt.
This program ( a function called testing) takes input as block data (say
data = [1,2,3,4] and outputs processed single data.
import math
def avrg(data):
return sum(data)/len(data)
def testing (data):
val =
(Please don't hijack a thread with an unrelated question. You're no
doing yourself any favors, as any decent thread-viewer will hide your
new subject line, and group the whole thread with its original title.
That can cause your query to be ignored by many of the readers.)
To start a new threa
I like to run a python program "my_python.py" from windows command prompt.
This program ( a function called testing) takes input as block data (say
data = [1,2,3,4] and outputs processed single data.
import math
def avrg(data):
return sum(data)/len(data)
def testing (data):
val = avrg(
12 matches
Mail list logo