I’m studying a data science bootcamp and we’re learning Python. One of the exercises is to make a battleship game. We’re using a NumPy array as the ocean, we want to use blue squares, 🟦 , to represente the sea… It runs fine in Visual Studio Code but not when opened directly with Python… Does anyone know how to fix it?
I try by using unicode, intalen emoji (doing pip install emoji on my console)…I saw many videos on youtube and asking for help to my friend gpt… but nothing appers to works.
def tablero(Tm):
nosotros = np.full((Tm, Tm), "🟦")
ordenador = np.full((Tm, Tm), "🟦")
separador = np.full((Tm+1, 2), "🟫")
numeros_de_columnas = []
2
Answers
You can use ANSI codes instead of symbol: