CoddityTeam / movaicode

Concours mensuel du Pire Développeur de France
122 stars 10 forks source link

Tout ce que je fait fini toujours par ressembler à ça #263

Open Llufollis opened 1 year ago

Llufollis commented 1 year ago

Fait en Python 3.8.10

bac = ["IPA","FENOUIL","TOMATE","REDBULL","8.6","SALADE","POIREAUX"]
a = 0
c = []
g = 0
h0 = 6
z1 = 6
pop1 = False
pop2 = False
pop3 = False
for y in range(len(bac)):
    z1 -= h0
    h0 -= 1
    b = bac[z1]
    b = b[::-1]
    if b == "API":
        c += str(a)
        break
    z1 = 6
    a += 1
h0 = 6
a = 0
z1 = 6
f = ["8", ".", "6"]
for g in range(len(bac)):
    z1 -= h0
    h0 -= 1
    b = bac[z1]
    b = b[::-1]
    if b == "LIUONEF":
        break
    a += 1
    z1 = 6
h0 = 6
a = 0
z1 = 6
for z in range(len(bac)):
    z1 -= h0
    h0 -= 1
    b = bac[z1]
    b = b[::-1]
    if b == "ETAMOT":
        break
    z1 = 6
    a += 1
a = 0
h0 = 6
z1 = 6
for g in range(len(bac)):
    z1 -= h0
    h0 -= 1
    b = bac[z1]
    b = b[::-1]
    if b == "LLUBDER":
        c += str(a)
        break
    a += 1
    z1 = 6
h0 = 6
z1 = 6
a = 0
e = ["R", "E", "D", "B", "U", "L", "L"]
for g in range(len(bac)):
    z1 -= h0
    h0 -= 1
    b = bac[z1]
    b = b[::-1]
    if b == "6.8":
        c += str(a)
        break
    a += 1
    z1 = 6
h0 = 6
z1 = 6
a = 0
for g in range(len(bac)):
    z1 -= h0
    h0 -= 1
    b = bac[z1]
    b = b[::-1]
    if b == "EDALAS":
        break
    z1 = 6
    a += 1
h0 = 6
z1 = 6
a = 0
d = ["I", "P", "A"]
for g in range(len(bac)):
    z1 -= h0
    h0 -= 1
    b = bac[z1]
    b = b[::-1]
    if b == "XUAERIOP":
        break
    z1 = 6
    a += 1
R = []
for Q in range(len(c)):
    temp = c[Q]
    if not(temp in R):
        R.append(temp)
ZX = 0
for H in range(len(R)):
    if pop3 != True:
        ZX = 0
    if pop2 != True:
        ZX = 2
    if pop3 != True:
        ZX = 2
    for J in bac[ZX]:
        if pop3 != True:
            for X in d:
                if X == bac[0][0]:
                    g += 1
                if X == bac[0][1]:
                    g += 1
                if X == bac[0][2]:
                    g += 1
        if g >= 2 and pop3 != True:
            bac.pop(0)
            pop3 = True
        g = 0
        if pop2 != True:
            for K in e:
                if K == bac[2][0]:
                    g += 1
                if K == bac[2][1]:
                    g += 1
                if K == bac[2][2]:
                     g += 1
                if K == bac[2][3]:
                    g += 1
                if K == bac[2][4]:
                    g += 1
                if K == bac[2][5]:
                    g += 1
        if g >= 5 and pop2 != True:
            bac.pop(2)
            pop2 = True
        g = 0
        if pop1 != True:
            for AUSCOURE in f:
                if J == bac[2][0]:
                    g += 1
                if J == bac[2][1]:
                    g += 1
                if J == bac[2][2]:
                    g += 1
        if g >= 3 and pop1 != True:
            bac.pop(2)
            pop1 = True
        g = 0
print(bac)  # affiche "bac"

... Logique = False