all stats

lyxal's stats

guessed the most

namecorrect guessesgames togetherratio

were guessed the most by

namecorrect guessesgames togetherratio

entries

round #4

guesses
comments 0

post a comment


c1.py ASCII text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
def entry(s1, s2):

    s1 = s1.lower()
    s1 = s1.replace(" ", "")
    s2 = s2.lower()
    s2 = s2.replace(" ", "")
    
    isAnagram = False
    permutationHistory = list()
    
    while not isAnagram:
        stringLength = len(s1)
        areStringsEqual = True
        if not stringLength == len(s2):
            areStringsEqual = False
        characterPosition = 0
        while areStringsEqual and characterPosition < stringLength:
            if not s1[characterPosition] == s2[characterPosition]:
                areStringsEqual = False
            characterPosition = characterPosition + 1
        if areStringsEqual == True:
            isAnagram = True
        if s1 in permutationHistory:
            isAnagram = False
            break
        permutationHistory.append(s1)
        temporaryString = ""
        characterPosition = 1
        while characterPosition < stringLength:
            temporaryString = temporaryString + s1[characterPosition]
            characterPosition = characterPosition + 1
        temporaryString = temporaryString + s1[0]
        s1 = temporaryString
    """if isAnagram == True:
        return True
    else:
        return False""" 

    # I was originally going to use the above but then I found this easier method on Google.com.

    return sorted(s1) == sorted(s2)