|
|
Line 1: |
Line 1: |
− | == Monday - Friday (1/26/15 - 1/30/15) == | + | == Monday - Tuesday (2/2/15) == |
| '''Agenda:''' | | '''Agenda:''' |
− | * Complete 2-player Tic-Tac-Toe | + | * Demo missing 2-player Tic-Tac-Toe |
− | * 1-player Tic-Tac-Toe | + | * Demo complete 1-player Tic-Tac-Toe |
− | ** Edit drawShape() so that you do not use the '''turn''' variable anymore | + | * If you have completed the easy computer version, then proceed onwards and create the hard computer version. |
− | **# Check valid move
| |
− | **# If so, then player moves
| |
− | **# Check for win/tie
| |
− | **# Computer automatically moves (see functions below)
| |
− | **# Check for win/tie
| |
− | ** Easy Computer
| |
− | **# Create a new function named computerMove(board), which takes the board as a parameter. It will return a list [row, col] where the computer will move
| |
− | **# Inside the function, generate a random row number and a random col number. If the [row][col] location is empty, then you can return it [row, col]
| |
− | **# If the [row][col] is not empty, then you should have a while loop that constantly generate new random numbers while the [row][col] location is non-empty
| |
− | ** Hard Computer
| |
− | **# Create multiple functions to analyze the board (e.g. checkRows(), checkCols(), checkDiags()) that looks for two in a line
| |
− | **# If there's two in a line, then return the location of the empty slot
| |
− | **# In case there are no two in a line, then return None
| |
− | | |
− | == Wednesday - Friday (1/21/15 - 1/23/15) ==
| |
− | * Complete and demo the graphical Tic-Tac-Toe
| |
− | | |
− | == Tuesday - Friday (1/13/15 - 1/16/15) ==
| |
− | '''Agenda:'''
| |
− | * Complete and demo the console-based Tic-Tac-Toe
| |
− | * Integrate graphics into your console-based Tic-Tac-Toe
| |
− | | |
− | == Friday - Monday (1/9/15 - 1/12/15) ==
| |
− | '''Agenda:'''
| |
− | * Tic-Tac-Toe board review
| |
− | * Complete the console text-based version of Tic-Tac-Toe
| |
− | * You will need to implement the following functions:
| |
− | * checkWin()
| |
− | ** Checks to see if there is a winner (3 lined up Xs or Os). Returns “X” if X wins, “O” if O wins, and “-” if there is still no winner
| |
− | *** Checks the 3 rows
| |
− | *** Checks the 3 columns
| |
− | *** Checks the 2 diagonals
| |
− | * checkFull()
| |
− | ** Checks to see if every element in board[][] has been filled
| |
− | ** Return False if any of the elements in board[][] are equal to dash ("-")
| |
− | ** Return True if every element in board[][] is not equal to dash ("-")
| |
− | ** HINT: Instead of checking if the board[][] is full, check if it is NOT full
| |
− | | |
− | == Monday - Thursday (1/5/15 - 1/8/15) ==
| |
− | * Make sure you have completed all your missing assignments
| |
− | * Tic-Tac-Toe walk-through
| |
− | * [http://www.pythontutor.com On-line Python Tutor]
| |
− | * Introduction to Matrices
| |
− | * Matrix Practice
| |
− | *# Write the code to create a 3x5 matrix of 1s
| |
− | *# Print out matrix
| |
− | *# Increase the element at [2][3] by 10
| |
− | *# Write a loop that increases all the elements of the matrix by 2
| |
− | *# Print out matrix
| |
− | | |
− | == Wednesday - Friday (12/24/14 - 1/2/15) ==
| |
− | * Winter Break
| |
− | | |
− | == Monday - Tuesday (12/22/14 - 12/23/14) ==
| |
− | '''Agenda:'''
| |
− | * Turn in Dual Enrollment forms and documentation
| |
− | * Dual Enrollment placement testing
| |
− | * [https://docs.google.com/presentation/d/15qiqHJeaICoR_1uhLK5ZPVY4DEjGayKcoEbdYxLtD-M/edit?usp=sharing Personal Finance]
| |
− | | |
− | == Friday - Friday (12/12/14 - 12/19/14) ==
| |
− | '''Agenda:'''
| |
− | * Turn in Dual Enrollment forms and documentation
| |
− | * Demonstrate your Benford's Law program
| |
− | * Create a new program that integrates your Benford's Law code, but also using Python Turtle to graphically display a corresponding bar graph
| |
− | | |
− | == Monday - Thursday (12/8/14 - 12/11/14) ==
| |
− | '''Agenda:'''
| |
− | * Benford's Law Assignment
| |
− | *# Create a text file that contains a list of 1000 numbers from a naturally occurring data set
| |
− | *#* If you cannot find one, try to getting ideas from:
| |
− | *#**[http://testingbenfordslaw.com/ Testing Benford's Law]
| |
− | *#**[http://www.data.gov U.S. Government's Open Data]
| |
− | *#**[http://www.census.gov/ U.S. Census Bureau]
| |
− | *# Write a python program that reads the file, extracts the first digit of every number, and determines the frequencies of 0-9
| |
− | *# Print out the frequencies (percentages) of the numbers 0 through 9
| |
− | * NVCC Dual Enrollment
| |
− | *# Complete the [http://apply.vccs.edu/ NVCC admission application] (obtain your NVCC student ID #)
| |
− | *# Complete the [https://docs.google.com/forms/d/1WrJpl6_PgO8xZ_i0JxjmyuBJUhZGR09QhhdrdRrXYfU/viewform NVCC Student ID# Survey]
| |
− | *# Write your name and NVCC student ID# on the placement sheet
| |
− | *# Circle and write your scores that place you out of the COMPASS exam
| |
− | *# Find and print out the documentation/evidence that shows your score that places you out of the COMPASS exam
| |
− | *#* Examples: PSAT scores, SAT scores, SOL scores (go to counseling for a print out)
| |
− | | |
− | == Wednesday - Thursday (12/3/14 - 12/4/14) ==
| |
− | '''Agenda:'''
| |
− | * Complete the rest of the File I/O, List & String Practice
| |
− | *# Assume you have a single string containing the entire U.S. Constitution. Calculate and print out the frequency of the word "the"
| |
− | *#* Download the following file: [[Media:Constitution.txt]]
| |
− | *#* Hint: There is a useful string function converts a string to a list of words.
| |
− | *# Assume you have a single data file with 1000 random numbers from 0 to 100. Print out the frequency of each of the numbers.
| |
− | *#* Example code to help read in a file:
| |
− | * Benford's Law
| |
− | *# Read and watch [http://www.kirix.com/blog/2008/07/22/fun-and-fraud-detection-with-benfords-law/ Benford's Law and Fraud Detection]
| |
− | *# Further reading [http://mathworld.wolfram.com/BenfordsLaw.html Benford's Law]
| |
− | *# Research and find a set of naturally occurring numbers. Here are some ideas, but you can come up with your own:
| |
− | *#* [http://www.census.gov/ U.S. Census Bureau]
| |
− | *#* Heights of mountains
| |
− | *#* Atomic weights in the periodic table
| |
− | *#* Baseball statistics
| |
− | *#* etc.
| |
− | *# Create a text file that contains a list of your numbers (try to have a list of 1000 numbers if possible)
| |
− | | |
− | == Monday - Tuesday (12/1/14 - 12/2/14) ==
| |
− | '''Agenda:'''
| |
− | * Demo any missing assignments
| |
− | * File Input/Output (reading/writing)
| |
− | * List & String Practice
| |
− | *# Test out the snippet of code below
| |
− | *# Analyze how it each line works and what each line does
| |
− | *# Try to complete the following exercises
| |
− | *# Assume you have a list of strings of peoples' full names in random order. Print out an alphabetized list of only the last names.
| |
− | *# Assume you have a single string containing the entire U.S. Constitution. Calculate and print out the frequency of the word "the"
| |
− | *#* Download the following file: [[Media:Constitution.txt]]
| |
− | *#* Hint: There is a useful string function converts a string to a list of words.
| |
− | *# Assume you have a single data file with 1000 random numbers from 0 to 100. Print out the frequency of each of the numbers.
| |
− | *#* Example code to help read in a file:
| |
− | <syntaxhighlight lang="Python">
| |
− | # open a text file
| |
− | file = open("Constitution.txt", "r")
| |
− | | |
− | # read all lines in the file and save in the constitution string variable
| |
− | constitutionStr = file.read()
| |
− | | |
− | # close the file
| |
− | file.close()
| |
− | | |
− | print(constitutionStr)
| |
− | </syntaxhighlight>
| |
| | | |
| == Archives == | | == Archives == |
| + | * [[IBCS1 - 1415 - January]] |
| + | * [[IBCS1 - 1415 - December]] |
| * [[IBCS1 - 1415 - November]] | | * [[IBCS1 - 1415 - November]] |
| * [[IBCS1 - 1415 - October]] | | * [[IBCS1 - 1415 - October]] |
| * [[IBCS1 - 1415 - September]] | | * [[IBCS1 - 1415 - September]] |