Alexa Metrics

Coding Adventure 8: Play Tic Tac!

Master Python

Be familiar with Python arrays and functions.

免費加入

描述

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

預覽視頻

任務

Print the board!

First, we need to print the board. Build a 3x3 variable list and fill it in with dash " - ". Once you print this list on the screen, the board will be complete! 

First X.

Read the two values beside Robo. The first value determines the column the second number determines 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 number determines the location of the first O. Set the "X" and "O" inside your list of lists variable and print it to screen.

2 Xs and 2 Os

Can you do the previous mission with two more "Xs" and "Os"? Print the list of lists to the screen after you put in the values.

Full game!

It's time to play a full game. Read 4 "Xs" and 4 "Os" locations and set them in the list of lists. Print the list of lists to the screen after you put in the values. Who will win??

Master Python

Be familiar with Python arrays and functions.

免費加入
Canada Flag 隱私政策使 使用條款
Got an invite