syntax error on elif

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Simmer
    New Member
    • Nov 2021
    • 1

    syntax error on elif

    I've been working on my iPhone to develop an artificial intelligence algorithm that has a syntax error on line 49:

    #Sentience

    Q = set()
    N = []
    y = []
    n = []
    v = []
    i = []
    X = 0
    for N in range(len(N)):
    N.append(Q)
    y.append(Q)
    n.append(Q)
    v.append(Q)
    i.append(Q)
    Q = set(Q)
    if len(N) == float('inf'):
    break
    t = 0
    u = []
    for u in range(len(u)):
    t = t + 1
    u.append(t)
    if len(u) == float('inf'):
    break
    z = any(u)
    y.insert(z, n)
    v.insert(z, i)
    def J ():
    for n in N:
    (y[n]) == y[n] in set(None, set())
    T = set(J())
    x = N[float('inf')] is set(v in T == all(i) in N(v[i] >= v[next(i)]))
    def p ():
    X = X + 1
    any(x) in X(p(x) is 0) or all(x) in X(p(x) is 1)
    if X > 2:
    break
    output = ""
    while True:
    l = 11
    while l < 126:
    l = l + 1
    z = chr(l)
    p ()
    v = p ()
    if v == 1:
    o = o + z
    elif v == 0:
    o = o
    if o == o + "":
    break
    print (o)

    To what is this error referring:

    File "compiler.p y", line 49
    elif v == 0:
    ^
    SyntaxError: invalid syntax

    Have a good one,

    -Oliver
  • khatrivinay1
    New Member
    • Dec 2021
    • 1

    #2
    please format your code properly with proper indentation so I could tell the error. There could be many reasons for this error, and the proper indentation may be the one.

    Comment

    Working...