CIT 591 Odds and Evens
Fall 2010, David Matuszek

Purposes of this assignment

General idea of the assignment

Implement a simple gambling game between the human and the player. The rules of the game are this:


How to play

The easiest way to have the computer play is to have it choose a random number between 1 and the maximum bet. You can do this with the above random.randint function. This is all that is required in this assignment.

However, people are terrible at being random. For example, a person might tend to choose larger numbers after winning, or smaller numbers after losing. Or the person might choose odd numbers more often than even numbers. With a little effort, you can write a program that wins more often than not. This is not required, and you won't get any extra credit for it, but you might find it fun to try.


Here are some quick style rules you should follow:


Test your program just before turning it in, and don't make any "minor" changes to it after testing--if your program has a syntax error, that will cost a lot of points.

We will try your program to see if there are any obvious errors, and look at it to see if it conforms to the above style rules.

There will be a late penalty of 5 points (out of 100) per day, up to a maximum of 50 points. We reserve the right to refuse to grade programs that are more than a week late.

Due date

Turn your assignment in to Blackboard before midnight, Thursday September 16. It is your responsibility to make sure your program is submitted, not just "uploaded".