This forum is now read-only. Please use our new forums! Go to forums
SyntaxError: EOF while scanning triple-quoted string literal
Cannot figure out why I did wrong
1.print ‘Welcome to the Pig Latin Translator!’
2.original = raw_input(“Enter a word”)
3.print original
4.empty_string = “””
5.if len(original) > 0:
- print “original”
6.else (original) == 0:
- print “empty”
Answer 532a242e7c82ca4d3b0001a3
What is this line for: 4.empty_string = “”” ? We need to see format to help debug, follow this post and then upload again http://imgur.com/gallery/MyteV
Answer 532b0b859c4e9d703600271e
Thanks, James! Just copy paste will give this:
print ‘Welcome to the Pig Latin Translator!’
original = raw_input(“Enter a word”)
print original
empty_string = “””
if len(original) > 0:
print “original”
else (original) == 0:
print “empty”
Answer 532b0c427c82ca8a79002b7c
I Fixed the triple quotation mark on line 7, and now the error is
File “python”, line 13 else (original) = 0: ^ SyntaxError: invalid syntax
and also Oooops, have you incidentally deleted the variable called original?
Answer 532d28189c4e9da4ee0025ac
Answer 532f62aa631fe93519007f76
Answer 5334a48f7c82ca8e7f00086b
print original shouldn’t have speech marks, it’s a variable.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency