Sunday, 13 May 2012

Variables & Assignment with P. Guo's Online Python Tutor

Text in the following video is blurry. It is what happens if you click the Visualize execution button


Code Listing:
#  <-----  that symbol starts a comment in the code

#  1 ---   Variables and assignment - Creating references

name = 'Betty'

firstname,lastname = 'Fred','Flintstone'

# There is no need to declare variables.

print "print statement output messages to the console"

print "any"
print "string"
print 'Betty'
print "print statement will 'print' variables"
print name
print firstname
print lastname

No comments:

Post a Comment