Message from discussion
Getting started with IDLE and Python - no highlighting and no execution
Received: by 10.66.89.225 with SMTP id br1mr319822pab.3.1344571650000;
Thu, 09 Aug 2012 21:07:30 -0700 (PDT)
Path: p10ni24664354pbh.1!nntp.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!feeder3.cambriumusenet.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!feed.xsnews.nl!border-2.ams.xsnews.nl!news.panservice.it!feeder.erje.net!xlned.com!feeder3.xlned.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!postnews.google.com!r7g2000yqr.googlegroups.com!not-for-mail
From: PeterSo <ojl...@gmail.com>
Newsgroups: comp.lang.python
Subject: Getting started with IDLE and Python - no highlighting and no execution
Date: Sun, 5 Aug 2012 16:46:54 -0700 (PDT)
Organization: http://groups.google.com
Lines: 37
Message-ID: <d07282d6-1666-4230-bf46-c0942ef9a390@r7g2000yqr.googlegroups.com>
NNTP-Posting-Host: 68.1.120.35
Mime-Version: 1.0
X-Trace: posting.google.com 1344210864 27940 127.0.0.1 (5 Aug 2012 23:54:24 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 5 Aug 2012 23:54:24 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: r7g2000yqr.googlegroups.com; posting-host=68.1.120.35; posting-account=DflkpwoAAAD8sNvq_RGrZysDSXckRrOm
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20100101 Firefox/14.0.1,gzip(gfe)
Bytes: 2028
X-Received-Bytes: 2076
Content-Type: text/plain; charset=ISO-8859-1
I am just starting to learn Python, and I like to use the editor
instead of the interactive shell. So I wrote the following little
program in IDLE
# calculating the mean
data1=[49, 66, 24, 98, 37, 64, 98, 27, 56, 93, 68, 78, 22, 25, 11]
def mean(data):
return sum(data)/len(data)
mean(data1)
There is no syntax highlighting and when I ran it F5, I got the
following in the shell window.
>>> ================================ RESTART
================================
>>>
>>>
Any ideas?
If I added print mean(data1), it gave me a invalid syntax
# calculating the mean
data1=[49, 66, 24, 98, 37, 64, 98, 27, 56, 93, 68, 78, 22, 25, 11]
data2=[1,2,3,4,5]
def mean(data):
return sum(data)/len(data)
mean(data1)
print mean(data1)