Created
April 5, 2024 19:17
-
-
Save dogweather/daba5b8a7361e2a72b98ea38dd33ea2d to your computer and use it in GitHub Desktop.
Fixed and Refactored Python code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
board = ["R", "N", "B", "Q", "K", "B", "N", "R","P", "P", "P", "P", "P", "P", "P", "P"," ", " ", " ", " ", " ", " ", " ", " "," ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "," ", " ", " ", " ", " ", " ", " ", " ","p", "p", "p", "p", "p", "p", "p", "p","r", "n", "b", "q", "k", "b", "n", "r"] | |
def Print_board(): | |
x = 0 | |
y = 0 | |
while y < 8: | |
print("\n") | |
while x < 8: | |
print(board[x] + " ", end="") | |
x += 1 | |
x = 0 | |
y += 1 | |
Print_board() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment