On line 31 in
You are missing an end quote
" and a end parenthesis
Also, on line 1 in variable
You have a long string that has the save and load game functionality. This string is vulnerable to code errors, as Repl.it treats it like a string. Like how you made
game.py, create a file called
savegame.py and create functions for loading, saving, or deleting the save game.
edit: Hmmm..... It seems you were trying to create a multiline statement on line 31 in
game.py. You must have forgotten to add 2 extra quotes to make it into a multiline.
"""This multiline statement is important for adding the extra line"""
There we go, the program is working!
Now that everything is working again, we need to conclude what happened so we don't make that mistake again.
First, we need to use
""" instead of
""" creates a multiline string which can output in multiple lines. We could also use
Second, we shouldn't put all our code in a multiline string, as Repl can't detect code errors.
Third, we need to organize code into functions and classes which will help us understand the code. It's also nice to document it with
Did it help? Mark this as the correct answer