473,289 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

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 15769
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

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

Similar topics

1
by: Steve | last post by:
I just spent waaaaaaaaaaaayy too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone can explain to me why it was reported that way. ...
1
by: Donald Canton | last post by:
Hi, I'm using Bjarne's book to learn C++ and am stuck on the Calc program in Section 6. Everything works fine except when I try to use istringstream to parse a token from the command line. I...
5
by: r.nikhilk | last post by:
Hi, Currently, we are porting C++ applications from 32 bit to 64 bit on AIX platform. (The current version of AIX is 5.3 and xlC verison is 8.0). We are able to compile the applications by...
2
by: david | last post by:
Anyone could give me a hand about this syntax error? Thank you. David Source Code: Dim conn As New SqlConnection(strConn) Dim daAngio As New SqlDataAdapter(strSelectStatement, conn) 'Create a...
3
by: Manuel | last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using devc++. So I've imported the glut32.dsp into devc++, included manually some headers, and start to compile. It return a very...
5
by: orangeDinosaur | last post by:
Here's a section of code: for x in occupants: if x not in uniqueUsers and not in staff: uniqueUsers.append(x) elif x in staff and not in uniqueStaff: uniqueStaff.append(x) When I try to...
6
by: muby | last post by:
Hi everybody :) I'm modifying a C++ code in VC++ 2005 my code snippet void BandwidthAllocationScheduler::insert( Message* msg, BOOL* QueueIsFull,
6
by: anderson1373 | last post by:
This is giving me a syntax error at the elif statement but i'm not sure why. please help me. miles = 0.0 kilometers = 0.0 def show_menu(): print("1. Convert miles into kilometers.")...
2
by: sbtunx | last post by:
hi the problem is a syntax error that highlights pink the "elif" in the program just that. this code is to water mark picture "test.jpg" with the water mark of "model.jpg" with a mark on a white...
14
by: calvin dong | last post by:
In my program to brute force all the factors (not including 1) of a number, there is a syntax error in my while loop. The code looks like this. number = raw_input(" Enter a number ") x = 2...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.