Informatică, întrebare adresată de zavoigabi06, 7 ani în urmă

Puțin ajutor la algoritmul asta va rog ​

Anexe:

Răspunsuri la întrebare

Răspuns de sunnyLOL
1

while True:

# Ask player A for the position of their block on the board

position = input("Player A, please enter the position of your block on the board: ")

# Check if the position is free using the checkblock() function

if checkblock(position):

# If the position is free, add the letter "A" to the position chosen in the gamegrid array

gamegrid[position] = "A"

break

else:

# If the position is not free, repeat the process

print("Sorry, that position is not available. Please try again.")

Alte întrebări interesante