Syntax
// the grass is green
# the moon is full
/* the sun is bright
dog = "rover"
print dog[2]
color = "blue"
if color = "blue":
print "the color is blue"
(1, 2, 3)
function pi():
return 3.14
function should be def
len(string)
for color in ["red", "blue", "green"]
print color
print ["red", "green", "blue"][1]
def howdy(parm1, parm2):
print "howdy %s %s!" % (parm2, parm1)
print howdy("Alex", "Trebek")
string.lower()
count = 0
while count < 10:
print count
count += 1
stuff = {"food": "pizza", "drink": "tea", 1:8}
print stuff[1]
for i in [1,2,3,4,5]:
if i == 3
print i
print "My dog's name is %s" %s "rover"
if 30 - (20 * 2) > 15:
print "True"
else:
print "False"
colors = ["red", "blue", "green"]
colors.append("yellow")
from datetime import datetime
print datetime.now()
import datetime
print datetime.datetime.now()
if count == 7:
print "count is 7"
else:
print "count is unknown"
elif count == 8:
print "count is 8"
me["name"] = "puddintain"