#๐ Why is this syntax error happening please?
17 messages ยท Page 1 of 1 (latest)
@rustic basalt
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Can you copy that entire line that starts with input( and paste it here please?
input('Bravo! The answer is indeed '+number+', you found it in '+guessesTaken+1'guesses.')
So if I switch that into a print statement
or rather, that 1 shouldn't be there
And run it against a Python interpreter
!e
print('Bravo! The answer is indeed '+number+', you found it in '+guessesTaken+1'guesses.')
:x: Your 3.13 eval job has completed with return code 1.
001 | File [35m"/home/main.py"[0m, line [35m1[0m
002 | print([1;31m'Bravo! The answer is indeed '+number+', you found it in '+guessesTaken+1'guesses.'[0m)
003 | [1;31m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[0m
004 | [1;35mSyntaxError[0m: [35minvalid syntax. Perhaps you forgot a comma?[0m
you're right, I erased the +1 but still same error
Its a bit clearer here. There is no + after the +1
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.