0

what’s wrong with my code?

message = “Game Over” print(message)

16th Oct 2023, 9:45 AM
lunaris
lunaris - avatar
6 odpowiedzi
+ 7
message = “Game Over” ^ SyntaxError: invalid character '“' (U+201C) ; use this "" for strings not this “ “
16th Oct 2023, 10:45 AM
**🇦🇪|🇦🇪**
**🇦🇪|🇦🇪** - avatar
+ 1
You need it give a space between the print and the message e.g print (message)
17th Oct 2023, 7:30 PM
Bright Ayim
Bright Ayim - avatar
+ 1
Do this " " instead or this ''.
17th Oct 2023, 8:03 PM
Werg Serium
Werg Serium - avatar
+ 1
lunaris some characters look very similar, but they are not interchangeable. perhaps you copy-pasted the code from a website?
18th Oct 2023, 12:11 AM
Bob_Li
Bob_Li - avatar
+ 1
The error you're encountering is due to the fact that you're using the wrong type of quotation marks around your string. In your code, you're using curly double quotation marks (“ ”) instead of regular double quotation marks ("" or ''). Here's the corrected code: ```python message = "Game Over" print(message) ``` Replace the curly quotes with regular quotes, and your code should work without errors.
18th Oct 2023, 2:58 AM
Ifthekher
Ifthekher - avatar
0
there is no error please run it again.
18th Oct 2023, 1:29 AM
Nitish Kumar
Nitish Kumar - avatar