SyntaxError: EOF while scanning triple-quoted string literal

Hi,

[codebyte]
I’m trying to make my friend a small python bday present, but it doesn’t work.

┌──(matteo㉿kali)-[~/PycharmProjects/AlienKey 18th Birthday]
└─$ python3 Happy\ Bday.py 1 ⨯
File “/home/matteo/PycharmProjects/AlienKey 18th Birthday/Happy Bday.py”, line 18
print(“Have a good ■■■ day with hopefully good presents and enjoy!”)
^
SyntaxError: EOF while scanning triple-quoted string literal

This is the script.

Something is wrong with your string literal,

'''An example of a triple-quoted
string literal might look like
this.
'''

Can you spot what’s missing in your case?

so do i do "print ’ ’ ’ Example ’ ’ ’ "?

I don’t think that would be necessary, so far as I can tell the issue is that your current triple-quote string literal is missing something.

tbh i have no idea, i dont code, but plan on doing it sometime in the future.
can you maybe show me how i do that in this case?
for like the " print(…)"
please

if its possible it would be better to put all the text in one print command and not 3

The issue isn’t with the other print functions. If you do spend time working with Python you’ll sometimes find syntax errors on lines you didn’t expect. This is normally caused by something previously not being properly closed, this is often parentheses ( but can be other language features like, in this case, a multi-line string.

1 Like

Ohhh got it so i gotta place ’ ’ ’ on the big happy bday text?
update: still doesnt work can someone maybe add me on discord so we can talk faster? i really need this done in 2 days

my discord is: Teo_Backup#3718

There’s a community discord that may be of interest to you-

Bear in mind like the forums it’s a learning environment, if you’re interested enough in Python to write birthday cards then I’d suggest making the most of the learning opportunities offered.

This post was flagged by the community and is temporarily hidden.