This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pam Qian Project Blackjack | |
# Use of class in Python | |
# Played by two players | |
import random | |
class Card: # Create the class | |
def __init__(self, card_num): | |
self.card_num = card_num |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pam Qian 2016 Fall CS 112 Python Midterm Project II | |
# Tic Tack Toe | |
def main(): | |
# The main function | |
introduction = intro() | |
board = create_grid() | |
pretty = printPretty(board) | |
symbol_1, symbol_2 = sym() | |
full = isFull(board, symbol_1, symbol_2) # The function that starts the game is also in here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pam Qian 2016 Fall CS 112 Python Midterm Project II | |
# Tic Tack Toe | |
def main(): | |
# The main function | |
introduction = intro() | |
board = create_grid() | |
pretty = printPretty(board) | |
symbol_1, symbol_2 = sym() | |
full = isFull(board, symbol_1, symbol_2) # The function that starts the game is also in here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Pam Qian 2016 Fall CS 112 Python Midterm Project II | |
# Tic Tack Toe | |
def main(): | |
# The main function | |
introduction = intro() | |
board = create_grid() | |
pretty = printPretty(board) | |
symbol_1, symbol_2 = sym() | |
full = isFull(board, symbol_1, symbol_2) # The function that starts the game is also in here. |