Skip to content

Py DS_Engineer Lab Report #03

Amy Lin edited this page Jun 28, 2017 · 3 revisions

Python Programming for Data Scientists & Engineers Lab #03

Lab #03-1 Convert each character into either a list or a tuple



Prompt user for a sentence or a word.

Take out spaces in user's input. (Assume other symbols besides empty space)

Breakdown the characters into a list and a tuple then output the results.


Lab #03-2 Ascending Tuple ( Order by the second element )



Create a list of tuples.

Sort the tuple in ascending orders by tuple's second element.

Output the result to the user.


Lab #03-3 Tic Tac Toe Game



Prompt player #1 and #2 for their moves. ( row, column )

If player #2 tempts to place a move that the player #1 already occupied, he/she will be ask to enter another coordinate.

Moves of player #1 and #2 will be output on the board on every move.



If the result is a tie, output "TIE" and end the game.



If player #1 won, announced player #1 as the winner and exit the game.



If player #2 won, announced player #2 as the winner and end the game!

Clone this wiki locally