[python-advocacy] How programming language webpages should be designed
rayallen153 at googlemail.com
Thu Nov 12 15:39:59 CET 2009
> > to see it possible to execute the code too.
***Hopefully, we'd be able to allow interactive execution thereby allowing
the user to guess ouptut first and witness the shuffle function in action.
I lvery much like the interactive shell used for the tutorial on the ruby
A dict would be nice too, but I don't want so much in one snippit
> that it becomes hard to follow.
> I like that your code has some marketing embedded in it.
***Thanks. The code as it stands is simple to follow, but it includes quite
a few concepts: the use of a standard library funciton; list creation; list
method; iteration; strings; integer; print output. In hindsight, I guess
it would remain simple and readable if we added a bit more flow control
(such as an if statement) but I'm not sure about dictionaires or classes.
These are soon discovered in the tutorial/documentation and are probably
best avoided if this is just intended to give a taster.
"""Example Python Program"""
# Create and add to a list
python = 
python.append("Easy to read")
python.append("Fast to code")
python.append("Quick to learn")
python.append("Modular and object oriented")
python.append("Open source and cross platform")
# Shuffle list
# Loop through list
count = 1
print "Python is ... "
for each in python:
count += 1
print "Discover more at http://www.python.org"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Advocacy