Learn python battle ship 17


Traceback (most recent call last):
File “python”, line 29, in
ValueError: invalid literal for int() with base 10: ‘SCT’

the error I got even after running the code given by the website


That would indicate an issue with the SCT (Submission Correctness Test) and nothing to do with our code. The workaroung (so you can proceed to the next lesson) is to comment out the input lines and copy the ship variables into the guess variables…

guess_row = ship_row
guess_col = ship_col

I’m not sure if this same problem occurs in multiple lessons or if it’s just this one. If the same thing happens once you get to the loop, comment out the input lines and replace them with calls to random_row() and random_col() to set your guesses.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.