Bad Aim (section)-- Need Help!


My code seems to work but I keep getting the error message "Oops try again .Make sure you print "Oop,that's not even in the ocean.".If the user guesses a row or column that is off the board"

I checked the other answers in the forum and they provide similar or same answers but I can't get my code to work.PLEASE HELP!!

if guess_row == ship_row and guess_col == ship_col:
print "Congratulations! You sank my battleship!"
if guess_row not in range(4) or guess_col not in range(4):
print "Oops,that's not even in the ocean."
print "You missed my battleship!"

Replace this line with your code.



I cut the code onto a notepad an re-pasted and it worked! I dont know what worked.Here is the code that worked now:

print "Oops, that's not even in the ocean."


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