How to make this Battleship game more user friendly in terms of values?
Question: I have a Battleship game set up in Python, however the grid i set up ranged
between 0 and 5. Meaning the first row and columns of the battleship will be
(0,0) I don't want this however, as any stranded user will likely count from
1, so they'll put (1,1) or (1,2) the value 0 won't be a value they'd think to
enter. How can I make my program reflect that, in a way where 1,1 is the
beginning column and row not the 2nd. As the user can only enter a value
between 0 and 4, 5 is represented as an invalid value and it says it's not on
the grid.

So the only possible combinations are these:

Row: 0, 1, 2, 3, 4, Column: 0, 1, 2, 3, 4

I want it to be:

Row: 1, 2, 3, 4, 5 Column 1, 2, 3, 4, 5

Here is my code:

    
    
    import random
    
    Battleship_Board = []
    
    for x in range(0,5):
      Battleship_Board.append(["O"] * 5)
    
    
    def print_Battleship_Board(Battleship_Board):
      for row in Battleship_Board:
        print (" ".join(row))
    
    print ("Let's play a game of Battleships!")
    print_Battleship_Board(Battleship_Board)
    
    
    def Random_Battleship_Board_Row(Battleship_Board):
    return random.randint(0, len(Battleship_Board)-1)
    
    def Random_Battleship_Board_Column(Battleship_Board):
    return random.randint(0, len(Battleship_Board[0])-1)
    
    Battleship_Board_Row = Random_Battleship_Board_Row(Battleship_Board)
    Battleship_Board_Column = Random_Battleship_Board_Column(Battleship_Board)
    
    
    print (Battleship_Board_Row) 
    print (Battleship_Board_Column) 
    
    for turn in range(5):
    
    Guess_Battleship_Board_Row = int(input("Guess the X coordinate:"))
    Guess_Battleship_Board_Column = int(input("Guess the Y coordinate:"))
    
    
    if Guess_Battleship_Board_Row == Battleship_Board_Row and Guess_Battleship_Board_Column == Battleship_Board_Column:
        print ("You sunk the battleship!")
        print ("My ship was here: [" + str(Battleship_Board_Row) + "][" + str(Battleship_Board_Column) + "]")
        break
    
    else:
    
            if turn + 1 == 5:
                Battleship_Board[Guess_Battleship_Board_Row][Guess_Battleship_Board_Column] = "X"
                print_Battleship_Board(Battleship_Board)
                print ("Game Over")
                print ("My ship was here: [" + str(Battleship_Board_Row) + "][" + str(Battleship_Board_Column) + "]")
    
            if (Guess_Battleship_Board_Row < 0 or Guess_Battleship_Board_Row > 4) or (Guess_Battleship_Board_Column < 0 or Guess_Battleship_Board_Column > 4):
                print ("The inserted value is not on the grid.")
            elif(Battleship_Board[Guess_Battleship_Board_Row ][Guess_Battleship_Board_Column] == "X"):
                print ("You already inserted this combination")
            else:
                print ("You missed my battleship")
                Battleship_Board[Guess_Battleship_Board_Row][Guess_Battleship_Board_Column] = "X"
            print ("Number of turns:", turn + 1,"out of 5")
            print_Battleship_Board(Battleship_Board)
    


Answer: You can just subtract one from the user's guess, and also add a note to say
that the numbers are not zero-based. Remember to check for valid input!

    
    
    Guess_Battleship_Board_Row = int(input("Guess the X coordinate:")) - 1
    Guess_Battleship_Board_Column = int(input("Guess the Y coordinate:")) - 1
    

