Getting started with IDLE and Python
Getting started with IDLE and Python - no highlighting and no execution
PeterSo ojlise at gmail.comSun Aug 5 19:46:54 EDT 2012
- Previous message (by thread): Intermediate Python user needed help
- Next message (by thread): Getting started with IDLE and Python - no highlighting and no execution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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)
- Previous message (by thread): Intermediate Python user needed help
- Next message (by thread): Getting started with IDLE and Python - no highlighting and no execution
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list