Sunday, October 12, 2014

Day 137

Python at CodeCademy. Worked on Python tutorial 5 of 13, A Day at the Supermarket: String Looping! Worked on looping through strings, like lists.

Code used:
for letter in "Codecademy":
    print letter

print
print

word = "Programming is fun!"

for letter in word:

    if letter == "i":
        print letter

Interaction for this code:

C
o
d
e
c
a
d
e
m
y

i
i

No comments:

Post a Comment