Bug report in the print section


#1



https://www.codecademy.com/en/courses/python-beginner-en-4XuFm/1/1?curriculum_id=4f89dab3d788890003000096


A wrong code in values inside the "if" function is accepted as a correct answer while the values of "guess_col" and "guess_row" have to be set to "ship_col" and "ship_row" respectively.


This following code is accepted as an answer:

if guess_col == 0 and guess_row == 0:
    print "Congratulations! You sank my battleship!".

While the correct code has to be as the following:

if guess_col == ship_col and guess_row == ship_row:
    print "Congratulations! You sank my battleship!"

I hope that I could explain the point in a correct way.


#2

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