It shows I am wrong in one of steps, Need help!
6.20 Breakout Rooms: Rooks on a Chessboard Write a function that, when given a list of rooks on a chessboard and a square on the chessboard, returns the number of times the square is attacked by the rooks. The chessboard is an 8 by 8 grid with each square a tuple of a column (a through "h) and a row (1 through 8). A rook moves vertically and horizontally, attacking each square on its column or its row (but not both-it can't defend itself). We assume the rooks can pass through each other a rook on a can attack the square a3 even if there is another rook on a5. The below image highlights all the squares that a particular rook attacks So using the above image as an example value, if rooks is [(e,4)) and square is (e 3), the function should return 1 because the square at location is attacked by the one rook. But if rooks is [(e',4)) and square is (1.8), the function should return O. In other words, numattackingrooks([('e',4)). ('e',3)) = 1 numattackingrooks([ce',4)), (1,8)) = 0 Hint You'll want to keep a counter variable during the loop that keeps track of the number of attacking rooks. For each rook, you want to increment the counter (this means increase it by 1) if that rook attacks the square in question 295818 1710234 main py of rook in the rock list which can attack the we_rowser rook_rowl in rook 1 posite..c'e, boksitle 411 (13 boksi 41.1.1.6.3.C. mode When done developing your program press the Submit for grading bumon below. This will Submit your program for auto thi -10101012121212121212.22/12 59 PM on 02/17/21 Total score: 2/4 Download this submission 11 D/1 0 Hember that not come defenditore D/1 6.20 Breakout Rooms: Rooks on a Chessboard Write a function that, when given a list of rooks on a chessboard and a square on the chessboard, returns the number of times the square is attacked by the rooks. The chessboard is an 8 by 8 grid with each square a tuple of a column (a through "h) and a row (1 through 8). A rook moves vertically and horizontally, attacking each square on its column or its row (but not both-it can't defend itself). We assume the rooks can pass through each other a rook on a can attack the square a3 even if there is another rook on a5. The below image highlights all the squares that a particular rook attacks So using the above image as an example value, if rooks is [(e,4)) and square is (e 3), the function should return 1 because the square at location is attacked by the one rook. But if rooks is [(e',4)) and square is (1.8), the function should return O. In other words, numattackingrooks([('e',4)). ('e',3)) = 1 numattackingrooks([ce',4)), (1,8)) = 0 Hint You'll want to keep a counter variable during the loop that keeps track of the number of attacking rooks. For each rook, you want to increment the counter (this means increase it by 1) if that rook attacks the square in question 295818 1710234 main py of rook in the rock list which can attack the we_rowser rook_rowl in rook 1 posite..c'e, boksitle 411 (13 boksi 41.1.1.6.3.C. mode When done developing your program press the Submit for grading bumon below. This will Submit your program for auto thi -10101012121212121212.22/12 59 PM on 02/17/21 Total score: 2/4 Download this submission 11 D/1 0 Hember that not come defenditore D/1