Python Day 2 Labs
Day 2 Labs
To access these labs, click on their github links, and then fork and clone their repositories.
[NESTED-LISTS-DICTIONARIES] (https://github.com/google-cssi/cssi-4-python-nested-lists-dictionaries-lab) lists inside of lists! dictionaries inside of dictionaries! lists inside of dictionaries! dictionaries inside of lists inside of dictionaries! Oh my!
DICE ROLL LAB [Methods, Loops, Conditionals] It should roll two dice five times, printing the rolls of each pair. Look at the code and get familiar with it. You will modify this program in three ways.
TIC-TAC-TOE [ Functions, Algorithm] Can you get this TIC TAC TOE game up to speed? How would you tell whether someone has won at a game of Tic Tac Toe? Open up game_solution_detector.py and fill in the missing pieces to get it working! Someone else has written a game. Your job is to write some functions to see whether or not the game has been won, and who won.
JUKEBOX LAB[Functions, Loops, Console Input, Conditional Statements] You’re going to write a jukebox that introduces itself to the user and then asks for input. There are a number of ways to accept user input. As an example, let’s build a program that asks a user for their name and says hello to that user using the gets command.
PYTHONIC LANGUAGE[Functions, Interpreter] For this challenge, you are going to write an interpreter for your own programming language, called “Pythonic”.
ALICE IN WONDERLAND 1 STRETCH LAB[Functions, Algorithm] Using the code snippet in alice.py as a starting point, analyze the text of Alice in Wonderland, in alice.txt, to determine how many unique words are in the book.
ALICE IN WONDERLAND 2 STRETCH LAB[Functions, Algorithm] Take the Alice in Wonderland exercise and start working on the two challenge problems there. Once you have a system for analyzing the properties of book-length texts and a system for generating random text based on those properties follow the steps of the lab.