What’s wrong with this??? | Sololearn: Learn to code for FREE!
Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję
+ 9

What’s wrong with this???

I’m doing a game in Python when this happened when I clicked run: it said SynaxError for the ious in PreviousY

5th Jun 2024, 8:58 PM
Hakam Khalil
41 odpowiedzi
+ 7
You need to end your statement with :
5th Jun 2024, 11:20 PM
Chris Coder
Chris Coder - avatar
+ 5
Hakam Khalil I think you should focus on finishing the Introduction to Python course that you started so that you will understand basic Python syntax.
10th Jun 2024, 5:21 PM
Keith
Keith - avatar
+ 4
Can you post your code?
5th Jun 2024, 10:20 PM
Keith
Keith - avatar
+ 2
can you post your code?
7th Jun 2024, 2:29 AM
Bob_Li
Bob_Li - avatar
+ 2
show more code. If you're trying to create an if statement it supposed to start with if, not elif. Since you have not provided much code, we don't even know if your code structure is correct. So share your code in the playground!
7th Jun 2024, 5:41 AM
Chris Coder
Chris Coder - avatar
+ 2
In line 15 , Remove space between != after previousX Give proper indentations Also line 19, what is that after [text]‘’? Did you meant to write = ‘ ’ instead?
7th Jun 2024, 11:30 PM
VIDHU S SAJEEVAN
VIDHU S SAJEEVAN - avatar
+ 2
https://www.geeksforgeeks.org/indentation-in-JUMP_LINK__&&__python__&&__JUMP_LINK/ a lot of parts in the code you posted have incorrect indentations. You have to fix them if you want the code to work. You probably copied them from somewhere else, and that usually paste the code with incorrect indentation.
10th Jun 2024, 1:43 AM
Bob_Li
Bob_Li - avatar
+ 1
Its VERY long I need some time ok?
5th Jun 2024, 10:31 PM
Hakam Khalil
+ 1
Wait acctully ill just send the part
5th Jun 2024, 10:31 PM
Hakam Khalil
+ 1
elif previousX != x or previousY != y Then is says SynaxError ious ^^^
5th Jun 2024, 10:34 PM
Hakam Khalil
+ 1
The ^ is under ious ok
5th Jun 2024, 10:35 PM
Hakam Khalil
+ 1
Really I never learned that
6th Jun 2024, 12:56 AM
Hakam Khalil
+ 1
is there a line number in the error message? that would help you track down where it's located...
6th Jun 2024, 5:31 AM
Bob_Li
Bob_Li - avatar
+ 1
Like after elif or the while thing
7th Jun 2024, 1:12 AM
Hakam Khalil
+ 1
?
7th Jun 2024, 1:13 AM
Hakam Khalil
+ 1
Wait i did put “:” at the end
7th Jun 2024, 1:16 AM
Hakam Khalil
+ 1
But it still says “ious” is wrong in PreviousY
7th Jun 2024, 1:16 AM
Hakam Khalil
+ 1
Ok
7th Jun 2024, 6:35 PM
Hakam Khalil
+ 1
Can you please provide the code?
7th Jun 2024, 10:10 PM
VIDHU S SAJEEVAN
VIDHU S SAJEEVAN - avatar
+ 1
Ok i will
7th Jun 2024, 11:08 PM
Hakam Khalil