Alexa Metrics

Coding Adventure 8: Play Tic Tac!

What is the function of a snowman?

Learn nested loops, Arrays, Lists and functions to build and play with your snowman

JOIN

Description

Awesome! Now we need to build a Tic Tac game. Can you?!

Preview Video

Coding Missions

Print the board!

Now print the board. Build 3x3 List variable and fill it with "-" and print it on screen. That will bring the game to the iceworld.

First X!

Now read the two values beside Robo. The first value determines the row number and the second value determines the cell location in the row. Set the correct cell in the list of lists variable to "X" and print the variable to screen to update the board. 

First O!

Now we have 4 numbers, the first two numbers determine the location of the first X. The third and fourth numbers determine the location of the first O. Set the "X and "O" inside your list of lists variable and print the variable to screen each time to update the board.

Do it twice!

Wow! Can you repeat the previous mission two more times for another X and another O. Print the list of lists to screen after each time you change a value in it to update the board.

Full game!

Now it's time to read 4 "X" and 4"O" locations and set them in the list of lists. Print the list of lists to screen after each time you change a value in it to update the board.

What is the function of a snowman?

Learn nested loops, Arrays, Lists and functions to build and play with your snowman

JOIN
Canada Flag Privacy Policy Terms of Use
Got an invite