# Commits

committed 008d2e6

ok

• Participants
• Branches master

`+a`
`+b`
`+c`
`+d`
`+e`
`+f`
`+g`
`+h`
`+i`
`+j`
`+k`
`+l`
`+m`
`+n`
`+o`
`+p`
`+q`
`+r`
`+s`
`+t`
`+u`
`+v`
`+w`
`+x`
`+y`
`+z`

# File hangman.txt

`+POSTFIX THE MTA`
`+APACHE THE HTTP SERVER`
`+SQUID THE PROXY SERVER`
`+LINUS TORVALDS`
`+RICHARD STALLMAN`
`+JOHN MADDOG HALL`
`+GENERAL PUBLIC LICENSE`
`+PYTHON IS NICER THAN RUBY`
`+RUBY IS NICER THAN PERL`
`+KERNEL PANIC CORE DUMPED`

# File index.py

`+import os`
`+import sys`
`+import time`
`+import random`
`+`
`+`
`+def problem_01():`
`+`
`+    l = []`
`+`
`+    for x in range(100):`
`+`
`+        while True:`
`+            n = random.randint(1, 10000)`
`+`
`+            if n not in l:`
`+                l.append(n)`
`+                break`
`+`
`+    max = 0`
`+    min = l[0]`
`+`
`+    for x in l:`
`+        max = x if x > max else max`
`+        min = x if x < min else min`
`+`
`+    return {'values': l, 'max': max, 'min': min}`
`+`
`+`
`+def problem_02():`
`+    tot = 0`
`+`
`+    for x in range(1, 1000):`
`+        if x % 3 == 0 and x % 5 == 0:`
`+            tot += x`
`+`
`+    return tot`
`+`
`+`
`+def problem_03(n1, n2):`
`+`
`+    n1 = int(n1)`
`+    n2 = int(n2)`
`+`
`+    if n1 < 0:`
`+        n1 = n1 - (n1 * 2)`
`+`
`+    if n2 < 0:`
`+        n2 = n2 - (n2 * 2)`
`+`
`+    old_n1 = n1`
`+`
`+    if n2 > n1:`
`+        n1 = n2`
`+        n2 = old_n1`
`+`
`+    if n1 == 0 or n2 == 0:`
`+        mmc = n1`
`+    elif n1 == 0 and n2 > 0:`
`+        mmc = n2`
`+    elif n1 > 0 and n2 == 0:`
`+        mmc = n1`
`+    else:`
`+`
`+        res = 0`
`+`
`+        while True:`
`+`
`+            n1 -= n2`
`+`
`+            if n1 > 0:`
`+                res = n1`
`+`
`+            elif n1 == 0:`
`+                mmc = n2`
`+                break`
`+            else:`
`+                n1 = n2`
`+                n2 = res`
`+`
`+    return mmc`
`+`
`+`
`+def problem_04():`
`+`
`+    placas = []`
`+`
`+    input = open('prefijos_placas.txt', 'r')`
`+    input = input.read().split('\n')[:-1]`
`+`
`+    for p in range(100):`
`+        while True:`
`+            code = input[random.randint(0, len(input) - 1)]`
`+            serie = random.randint(100, 999)`
`+            placa = '%s-%d' % (code, serie)`
`+`
`+            if placa not in placas:`
`+                placas.append(placa)`
`+                break`
`+`
`+    return placas`
`+`
`+`
`+def problem_06():`
`+`
`+    data = {}`
`+`
`+    words = open('alfabeto.txt', 'r')`
`+    words = words.read().split('\n')[:-1]`
`+`
`+    def find_words(value):`
`+`
`+        if not value:`
`+            return False`
`+`
`+        for x in value:`
`+            if not x in words:`
`+                return False`
`+`
`+        return True`
`+`
`+    input = open('rfc2616.txt', 'r')`
`+    input = input.read().split(' ')`
`+    input = [x for x in input if find_words(x)]`
`+`
`+    for x in input:`
`+`
`+        if not x in data:`
`+            data[x] = 1`
`+        else:`
`+            data[x] = data[x] + 1`
`+`
`+    new_data = {}`
`+`
`+    for x, y in data.items():`
`+        if y >= 100:`
`+            new_data[x] = y`
`+`
`+    return new_data`
`+`
`+`
`+def problem_07():`
`+`
`+    total = 1000`
`+    points = (50, 50, 50, 100, 100, 100, 150, 150, 150, 100)`
`+    n1 = random.randint(1, 101)`
`+`
`+    for x in points:`
`+`
`+        n2 = int(raw_input('Enter number:'))`
`+`
`+        if n1 == n2:`
`+            print total`
`+            break`
`+        else:`
`+`
`+            if n1 < n2:`
`+                print 'el numero es menor que %d' % n2`
`+            else:`
`+                print 'el numero es mayor que %d' % n2`
`+`
`+            total = total - x`
`+`
`+`
`+def problem_08():`
`+`
`+    input = open('matrix.txt', 'r')`
`+    input = input.read().split('\n')[:-1]`
`+`
`+    while True:`
`+`
`+        body = ''`
`+`
`+        for x in range(8):`
`+`
`+            chr = input[random.randint(0, len(input) - 1)]`
`+            body += '%s  ' % chr`
`+`
`+        sys.stdout.write(os.popen('clear').read())`
`+        print body`
`+        time.sleep(2)`
`+`
`+`
`+def problem_10():`
`+`
`+    input = open('hangman.txt', 'r')`
`+    input = input.read().split('\n')[:-1]`
`+`
`+    n = 8`
`+`
`+    def output(op):`
`+        new_phase  = ''`
`+        for x in op:`
`+            if x == ' ':`
`+                new_phase += ' '`
`+            elif x == '+':`
`+                new_phase += x`
`+            else:`
`+                new_phase += '*'`
`+`
`+        return new_phase`
`+`
`+`
`+    phase = ' '`
`+    phase1 = input[random.randint(0, len(input) - 1)]`
`+    phase1 = 'mac do'`
`+`
`+    """`
`+    xphase = ''`
`+    for x in phase1:`
`+        if x == ' ':`
`+            xphase += ' '`
`+        else:`
`+            xphase += '*'`
`+    #phase1 = xphase`
`+`
`+    print phase1, xphase`
`+    """`
`+`
`+    while 0 < n:`
`+`
`+        if phase in phase1:`
`+            phase1 = phase1.replace('', ' ').replace(phase, '+' * len(phase))`
`+`
`+        _output = output(phase1)`
`+`
`+        #print _output`
`+`
`+        n -= 1`
`+`
`+        """`
`+        if phase in phase1:`
`+            print 'xxx'`
`+            phase1 = xphase.replace(phase, len(phase) * '*')`
`+        """`
`+`
`+        print 'phase: %s' % _output`
`+        phase = raw_input('Enter phase: ')`
`+`
`+        """`
`+        if phase in phase1:`
`+`
`+            print 'cccc'`
`+            phase1 = phase`
`+            return`
`+        """`
`+`
`+        sys.stdout.write(os.popen('clear').read())`
`+`
`+problem_10()`
`+`
`+`
`+`
`+`
`+"""`
`+i = ronald martinez`
`+`
`+i.`
`+o = ------+--------`
`+`
`+print o`
`+`
`+if phase in i:`
`+`
`+    i = i.replace(phase, '+')`
`+ro`
`+"""`
`+`
`+`
`+`

`+0`
`+1`
`+2`
`+3`
`+4`
`+5`
`+6`
`+7`
`+8`
`+9`
`+a`
`+b`
`+c`
`+d`
`+e`
`+f`
`+g`
`+h`
`+i`
`+j`
`+k`
`+l`
`+m`
`+o`
`+p`
`+q`
`+r`
`+s`
`+t`
`+u`
`+v`
`+w`
`+x`
`+y`
`+z`
`+(`
`+)`
`+|`
`+*`
`+%`
`+\$`
`+#`
`+!`
`+@`
`+{`
`+}`
`+[`
`+]`
`++`
`+-`
`+:`
`+;`
`+<`
`+>`

`+BIT`
`+PHP`
`+JNI`
`+AQP`
`+RIP`
`+MTV`
`+IBM`
`+BMW`
`+FBI`
`+OQK`
`+RBC`
`+HIV`
`+ONP`
`+NSA`
`+FSF`
`+GNU`
`+MVC`
`+RPC`
`+RPP`
`+QNX`