This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
words = [] | |
def charComp(a, b): | |
if a == b: | |
return ("100%") | |
tempW = '' | |
for count in range(len(a)): | |
if count >= len(a) or count >= len(b): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l1 = (1,3,9,10,4,3,2,5,17,16,11) | |
def odd(num): | |
if num % 2 != 0: | |
return True | |
def addIt(t): | |
l = [0,0] | |
return addItR(t,l) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l1 = [1,3,9,10,4,3,2,5,17,14,11] | |
def splitIt(x): | |
''' | |
This recursive function takes a list of positive integers | |
x as argument and returns a tuple of two lists: a list of the even integers | |
in x followed by a list of the odd integers in x. | |
E.g. x = [3,2,1,5,4,6] gives [1,3,5] [2,4,6] | |
x = [1,3,9] gives [1,3,9] [] |