469,903 Members | 1,506 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

syntax error on elif

1
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.py", line 49
elif v == 0:
^
SyntaxError: invalid syntax

Have a good one,

-Oliver
Nov 29 '21 #1
1 11330
khatrivinay1
1 Bit
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.
Dec 1 '21 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Steve | last post: by
1 post views Thread by Donald Canton | last post: by
3 posts views Thread by Manuel | last post: by
5 posts views Thread by orangeDinosaur | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.