nov 3
homework
Go over examples from your last submitted homework,
particularly the class/object stuff and the BlackJack assignment.
a Card class
As a group exercise, create a Card class and a short main()
program that creates two cards and sees which one is better.
Here's the main() I'd like to use:
cards = [None, None]
for i in (0,1):
cards[i] = Card()
print "card %i is %s" % (i, card)
if card[0] > card[1]:
print "The first card wins."
else:
print "The second card wins."
Discuss the homework assignment, poker hands,
and the Hand, Deck, and PokerHand classes.
Start setting 'em up their definitions.
Nov 3 after class: I've attached the two python files we worked in in class. Neither has been tested or debugged, so there are likely still syntax errors. The card.py file is a step towards the homework assignment; you can use it if you like, but if so cite it.
euler 55
Depending on time, look at problem 55 from project euler,
and think about what pieces of that would fit into
an object-oriented programming framework. What sorts
of "things" is this about? So what sorts of objects
and methods do we need?