9. It's Not Cheating-It's Debugging


#1

My code from the previous lesson got me to this lesson, and I followed the very simple directions to print both ship_row and ship_col, and it has a problem with a line unrelated to the new code. I got this error code following the Guess Row input spot:

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

Have no idea why or what this means.


#2

It means the SCT is failing itself. The workaround is to re-use the values you generated for the ship.

guess_row = ship_row
guess_col = ship_col

Comment out the input lines.


#3

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