Need help with Battleship Project

Is there something wrong with codecademy? I am going through the battleship project and it does not seem to be working proplerly.

@gsawdy85 Welcome to the forums! Could you please say how Codecademy is not working?

Hi @gsawdy85

As @alyssavigil mentioned in her reply to you previously, please take a look at the following thread which will help us better answer your question. :slight_smile:

As a minimum, though, if you can provide us with a link to the project and some more information about how it’s not working (i.e. if you’re getting an error, what is the error?) we’ll likely be able to help.

This is the error message that I received. I know the code is right because I just had the program give me the answer because I couldn’t progress. Please let me know if I missed something or if you need something else.


Hi @gsawdy85

That error would suggest your program never actually finished

Can you post the code you ran to get that?

The Codecademy forum provides a quick and easy way to post properly-formatted code. All you need to do is look for the </> icon in the menu bar which appears at the top of the text box while you type.


Press Enter to go to a blank line, click that icon, and you will see this:


Just copy and paste your code directly from the editor into that highlighted portion, and we’ll be able to run exactly the program you did to get that error. :slight_smile:

Hi, @gsawdy85, and welcome to the Codecademy Forums!

As @thepitycoder has advised, you should copy and post your code so that we can examine it.

Also be aware that the problem you have encountered arises often with the Battleship! lesson. Evidently, the system is slow to accept input, and sometimes it times out while the user tries to enter that input. Most often, if the user keeps trying, the input eventually gets accepted.

We look forward to seeing your code.

1 Like

Ok, I just want to send this. I have moved on from the battle ship game and just forced through it by having the program give me the answer and move on. Here is another example of the same thing occurring. The code is correct and it is giving me the same time out issue. Why is this happening?

Enjoying the course? (y/n)Traceback (most recent call last):
File “python”, line 1, in
ExecTimeoutException: Program took too long to terminate.

while choice != 'y' and choice != 'n':  # Fill in the condition (before the colon)
  choice = raw_input("Sorry, I didn't catch that. Enter again: ")

It is a bug in the system. Sometimes, we can work around these bugs by doing something like this:

while choice != 'y' and choice != 'n':  # Fill in the condition (before the colon)
  # choice = raw_input("Sorry, I didn't catch that. Enter again: ")
  choice = 'y'

While it’s not quite a satisfactory solution, it will help you move on, if the submission correctness test (SCT) for the exercise accepts it.

Well, I hope you’re still enjoying it, anyway. :sweat_smile:

Sorry, been busy. Yes, I enjoy the course very much. Do you guys devote as much resources to the Python 2 language? I know it’s probably going to be out of date at some point. Should I switch to python 3?

If by that you mean “do we answer questions relating to Python 2”, then yes - there’s still a Python 2 course on Codecademy so… :slight_smile:

There are some differences between Python 2 and Python 3, but they’re not so great that you should immediately ditch the Python 2 course if you’re part way through. Python 2 may be EOL, but it’s still Python and the course is still useful. :slight_smile:

That being said, eventually yes everything ought to move to Python 3. :slight_smile: