Please help me I have coded python for a while and I have basic knowledge, however I have never encountered this error even thought I have created this identical code and I didn't have a problem. Have I miss typed please help.
Asked
Active
Viewed 132 times
-4
-
Where did this error come from? What was your code? What kind of interpreter are you using – whackamadoodle3000 Jul 12 '17 at 19:06
-
My compiler threw an error. No code found. Please post your code an error – Arpit Solanki Jul 12 '17 at 19:08
-
Welcome to StackOverflow! Please read the topics in [Help Center > Asking](https://stackoverflow.com/help/asking). Your question is in danger of being closed if you don't improve it. – Jul 12 '17 at 19:13
-
print ("Welcome to the gaming quiz. All of your answers in the quiz must be all lowercase, include spaces and be spelt right") print ("Question 1..") x = input ("What Call of duty was released in 2015") if input != x: print ("Sorry that was incorrect. Better luck next time") – JJ Beast Jul 12 '17 at 19:13
-
thats my code using python 3.6 edited by idle – JJ Beast Jul 12 '17 at 19:14
-
You have two `print` functions on one line. – Jul 12 '17 at 19:15
-
no sorry thats just the way it copy pastes you can see the screenshot i linked in the original question – JJ Beast Jul 12 '17 at 19:17
-
I'm talking about the screenshot – Jul 12 '17 at 19:19
-
sorry but even after i fixed that it still doesnt work – JJ Beast Jul 12 '17 at 19:24
-
sounds like you have some non-visible or hidden `NULL` bytes in your code, similar to the behavior in this question [Python: source code string cannot contain null bytes](https://stackoverflow.com/questions/31233777/python-source-code-string-cannot-contain-null-bytes) but of course on Windows. You might want to try copying the text from IDLE into another text editor that can view hidden/non-ascii encoding. Inspect for and remove any unusual characters then paste the "cleaned" text back into IDLE and try running the code again. My guess something near that Grey block between the print and `x` – chickity china chinese chicken Jul 12 '17 at 19:52
-
Also you could press [edit](https://stackoverflow.com/posts/45065685/edit) on your question and `copy`/`paste` the code into your question and let us view the ***text*** to check for hidden characters – chickity china chinese chicken Jul 12 '17 at 19:56
1 Answers
0
Your code contains an invalid condition. Use "Call of Duty: Black Ops III" != x
condition instead of input != x

Annamalai Palanikumar
- 334
- 4
- 19