jonlyles
|
codepad
|
|
jonlyles
|
Saved pastes by jonlyles:
def count(sequence,item):
count = 0
for i in sequence:
if i == item:
count = count + 1
|
view (8 lines, 1 line of output) |
score = {"a": 1, "c": 3, "b": 3, "e": 1, "d": 2, "g": 2,
"f": 4, "i": 1, "h": 4, "k": 5, "j": 8, "m": 3,
"l": 1, "o": 1, "n": 1, "q": 10, "p": 3, "s": 1,
"r": 1, "u": 1, "t": 1, "w": 4, "v": 4, "y": 4,
"x": 8, "z": 10}
|
view (13 lines, 1 line of output) |
def del_vowels(text):
no_vowels = ""
for i in text:
if i not in "aeiou":
no_vowels = no_vowels + i
|
view (9 lines, 1 line of output) |