Problem-centric Programming Instruction—Problem List

Stephen Hughes, Coe College

J. Philip East, University of Northern Iowa

Introduction/Background

Several years ago we started revising our approach to teaching programming. The key idea was to introduce language features as needed in the context of doing things—solving problems large and small. That approach diverges significantly from what we consider the traditional and common approach of organizing and teaching around programming language features. We believe it allows a greater emphasis on problem representation and problem solving and better teaches programming.

The original spark of this approach arose from Stephen's desire to "walk into class with a list of problems and tell students that by the end of the course, they should be able to solve them". Eventually someone asked, "Where's your problem list?" We hadn't really developed the list. But now we have and here it is. This page is evolving as is our the result of our continued examination of how programming can be better learned and taught.

If you have questions, suggestions for improvement of what is included, or something to include, please contact us.

At the moment we have not totally figured out how to start working on the big problems we expect students to be able to handle at the end of the course. There are lots of competing notions:

We are still working on improving what we do. There is at least one element of our instructional approach that we feel is particularly useful for teaching programming. We try to encourage students to ask themselves a question when they encounter a new problem or experience difficulties — "Why can't I write this program? There are several possible responses to this question with suggested action when an answer is recognized.

Without this or some other mechanism to provide guidance for the programming process students are left to a guess-and-check development process that is inefficient, prone to bad habit formation, and, almost certainly, ineffective.

Our original idea was to walk into class with a list of problems. We had no clear idea of what the problems might look like. Since then we have begun categorizing problems according to their size, instructional use, and/or programming concept addressed.

Finally, The Problems

But first two more things. First, the problems below are phrased to communicate the problem to you, a teacher who already knows programming. We encourage you to rework the problem statements to be more natural/realistic and less prescriptive of solution, e.g., remove the specifications about getting specific inputs and reporting specific results. Second, the lists begin with small problems and work their way up to more complex problems. That arrangement is probably most readily applied to the way most programming is currently taught and suggest a more bottom up approach as opposed to a more holistic problem solving approach. We hope you will keep in primary goal of problem-solving in mind as you use this list for your own instructional purposes.

Practice Problems/Exercises

Sequence & Assignment & I/O with Primitives

These problems or exercises are similar to learning activity for vocabulary and basic grammar when studying a new natural language. While you can make plans in your native language you cannot actually say or write in the new language without knowing the words and legal ways of combining them. This does not imply that you must start with these. A whole language approach would (we think) have you do the planning and learning of vocabulary at the same time.

We associate these problems/exercises with the programming language primitive data types which are typically numeric, string, and Boolean. There are operators and functions associated each kind of data that are used to formulate expressions that solve the "problems". An additional element of these exercises is that they involve variable declarations, the use of input & output, and the use of GUI element definitions (if your language has GUIs).

Numeric

Note that there are at least two ways to use these problems. You can provide students with formulas to use or you can include finding an appropriate formula as part of the problem. We have used both types, often posing the question, "Why can't you write this program?" An answer to that question is "I don't know how to calculate it." Solving the problem then requires determining a formula for the calculation as well as translating it into appropriate code. The other common answer to the question is I don't know how to do that in ____ (Python, Java, Visual Basic, ...). Solving the problem then requires knowledge of a particular programming feature (e.g., random number generator, conversion to integer, string search).

Boolean

Boolean expressions are most often used as the conditionals in selection and repetition. However, they are or can be used as flag values and it is not unreasonable to teach them that way. Indeed, separating the formulation of conditional expressions from if and while/until statements is probably a good idea. We think of all Boolean expressions as answering a question about the data with yes/True or no/False. Thus, the wording of the problems/exercises.

Selection

There are a number of ways that if statements may be organized:

While all these are possible, take care to maintain the emphasis on problems, not on how if statements may be used. Generally speaking the choice of which to use is a matter of personal preference rather than correctness, particularly for novice programmers.

General

  1. Least of two

    Get input for two numeric values and identify the lesser of the two.

  2. Least of two (2)

    Get input for two string values and identify the lesser (which comes first alphabetically) of the two.

  3. Least of three

    Get input for three values and report the lesser of the three (lesser means "comes first alphabetically" for string values).

  4. Number guessing

    Get input for a guess of a number and report to the user "too high", "too low", or "that's it".

  5. Pay

    Get input values for hours worked and pay rate;  then determine and report gross and net pay that accounts for overtime. Net pay will be the gross pay less 15% federal tax, 5% state tax, 6.2% FICA, & 1.45% Medicare.

  6. Leap year (1)

    Get an input value indicating a year and report whether it is a leap year.

  7. Leap year (2)

    Get an input value indicating a year and report whether it is a leap year. If it is a leap year, indicate so. If it is not a leap year indicate why, i.e., it is not divisible by 4 or it is divisible by 100 but not 400.

  8. Title length

    Get an input value indicating a title for a article. If the title is too long (more than 50 characters), report that to the user.

  9. Abstract length (1)

    Get an input value indicating an abstract for a article. If the title is too short (fewer than 150 characters) or too long (more than 300 characters), report to the user that the abstract is of unacceptable length.

  10. Abstract length (2)

    Get an input value indicating an abstract for a article. Report to the user that the abstract's length is okay, too short, or too long.

  11. Roll flooring

    Some types of flooring comes in rolls of fixed width, perhaps 12 feet. Get input values for the dimensions of a room and indicate the number of lineal feet of floor covering that will be needed.

  12. Blood sugar

    Get an input value indicating blood sugar level and indicate to the user if it is too low, okay, high, or extremely high. The cutoff values are 50, 180, & 400.

    (Do NOT consider this authoritative. It is put together from various web sources solely for the purpose of generating a programming problem.)

  13. Coin flip

    Use the system's random number generator to indicate whether a head or a tail was flipped.

  14. Grade determination

    Get input values representing a student's total score for the course and the total of possible points; then report the grade for that student score. Assume only A, B, C, D, F will be used—no plusses or minuses.

  15. Military time to analog time

    Accept a value indicating miliary time 00:00 to 23:59 (00 hours & 00 minutes to 23 hours and 59 minutes) and convert the value to analog time 00:00-11:59 AM or 12:00-11:59 PM.

  16. Craps: come out

    Generate random values for two dice rolls. If the roll is craps (2, 3, or 12) report "Craps! New shooter." If the roll is 7 or 11 report "Natural, a winner!" Otherwise set the point variable to the value of the roll and set the come-out flag to False.

  17. Craps: point

    Generate random values for two dice rolls. If the roll is 7 report "Seven out! New shooter." and set the come-out flag to True. If the roll is the same as the point value report "Point, a winner!" and set the come-out flag to True. Otherwise set the point variable to the value of the roll and set the come out state variable to False.

  18. Craps: valid bet

    Computerized gaming and betting typically has the user/player enter a amount in their bank. Bets must be greater than zero and less than the "bank". Provide code that will get an input value for the bet amount; then report if it is not a valid bet. (No action on valid bets.)

  19. Tip calculator (1)

    I hate being thought of as a cheap tipper. So I always tip 20% of the meal cost. But I know that people working at inexpensive places work as hard to serve me as those in expensive places so I always tip at least $4.00. Produce code that will get an input value for the meal cost and report how much to tip according to my rules.

  20. Tip calculator (2)

    I hate being thought of as a cheap tipper. So I always tip 20% of the meal cost. But I know that people working at inexpensive places work as hard to serve me as those in expensive places so I always tip at least $4.00. And, I never tip more that $5.00 per person served. Produce code that will get input values for the meal cost and persons served;  then report how much to tip according to my rules.

  21. Arithmetic drill operator

    Provide code that will request the user indicate the kind of drill and practice to present (Addition, Subtraction, Multiplication, Division) and set the value of the operator (variable named op) to +, , x, or / to be used when displaying problems depending on what was entered (A, S, M, D).

  22. Arithmetic drill problem generation

    Provide code that will randomly generate arithmetic drill & practice problems for values 0 to 10. The problem will be presented in the form value1 + value2 = ___ (the "answer" will be known but not shown). For addition and multiplication this is relative straightforward, i.e., value1 and value2 are randomly generated and the "answer" is the sum or product of the two. For subtraction and division the two values between 0 and 10 (inclusive) are randomly generated and and their sum or product calculated. That sum or product will be "value1" in the problem and the "answer" will be the first of the two generated values. Thus value1 and answer will have their values swapped.

  23. Arithmetic drill problem presentation and checking

    Provide code that will display arithmetic practice problems in the form value1 op value2 = ___. Note that "op" is a variable containing one of +, ndash;, x, and / and the value of the answer will be known but not shown. Assume you have appropriate values for op, value1, value2 and answer. Accept an input from the user, compare it with the correct answer, and report whether the user was correct.

  24. IPERS

    Provide code that will accept input indicating age and years of service; then report whether a person with these attributes can begin drawing IPERS retirement. To draw IPERS (Iowa Public Employees Retirement System) retirement one must meet one of three conditions for age and service. The three conditions are: sum of age and years of service equals or exceeds 88; age is at least 62 and years of service is at least 20; age is 65 or more.

  25. Time-delay (Thank you, Ben Schafer)

    Provide code that will take a given time (in AM/PM form) and add to it another given time (in AM/PM form with no assumptions about the delay value's validity, e.g., 1:90 is valid) and produce the resulting time (in AM/PM form). [A context for this is the publication of school bus pick-up schedules and the scheduled times when there is a school start delay.]

  26. Archery target area percentage

    A standard archery target has ten rings—rings 1 & 2 are white; 3 & 4, black, 5 & 6 blue; 7 & 8 red; 9 & 10, yellow); the outer ring's outside diameter is 48 inches; each individual ring adds 4.8 inches to the radius of its circle. Get a value indicating color and report the percentage of the whole target that the indicated color constitutes.

GUI Oriented

  1. Data entered

    Provide code that will notify the user if they have clicked the button but not entered any data in the textbox txtInput.

  2. Number entered

    Provide code that will notify the user if they have clicked the button but not entered numerical data in the textbox txtAge.

  3. Selection made

    Provide code that will notify the user if they have clicked the button but not selected anything in the combo box cboBirthYear.

  4. Pizza size

    Check the pizza size radio buttons (rdoSmall, rdoMedium, rdoLarge) to determine the size of a pizza, i.e., set the variable size appropriately (10, 12, 16). If none of the radio buttons was selected the variable orderOkay should be set to False and the user notified that the size had not be indicated.

  5. Pizza toppings

    Check the pizza topping checkboxes (chkHamburger, chkSausage, chkPepperoni, chkMushroom, chkPeppers, chkOnions) to determine the toppings for a pizza. While doing so, construct a string indicating the toppings, e.g., hamburger :: peppers :: onion. If no toppings were selected the variable orderOkay should be set to False and the user notified.

  6. Pizza order complete

    Combine tests for pizza crust selection, pizza size selection, and pizza toppings selection. When all three have been checked and no error found, record the order.

  7. Valid bet

    Computerized gaming and betting typically has the user/player enter a amount in their bank. Bets must be greater than zero and less than the "bank". In craps there are a number of possible bets. Provide code that will get an input value for the bet and examine a combo box used to indicate the type of bet. The first and default selection for the combo box is Select bet type which is not a valid selection. Report "the" problem if the bet is not valid.

  8. Password tester (1)

    Assume we have an app that allows people to enter a password length and check radio buttons to indicate the planned content of their password and report whether it would be valid. Each of the following must be included for the password to be valid:  1) lower-case letter, 2) upper-case letter, 3) digit, 4) special character. The length must be at least 9 and all types of characters used for the password to be valid. Check input and report to the user whether the planned password is valid.

  9. Password tester (2)

    Assume we have an app that allows people to enter a password length and check radio buttons to indicate the planned content of their password and report whether its "strength". Strength depends on: a) length (1 point per character) and one additional point for each of the following characteristics: b) lower-case letter, c) upper-case letter, d) digit, e) special character. Report strength as one of the following: weak (scores less than 9), okay (scores of 9-10, good (scores of 11-12), strong: (scores over 12).

Repetition

  1. Coin flips (1)

    Simulate the flipping of a coin repeatedly (e.g., 1,000 times). Record and report the counts of heads and tails.

  2. Coin flips (2)

    Simulate the flipping of a coin repeatedly with the number of repetitions depending on a value entered by the user. Record and report the counts of heads and tails.

  3. Coin flips (3)

    Simulate repeated trials of flipping of a coin 1,000 times with the number of trials depending on a value entered by the user. Report the result of each trial. When done report the average counts of heads and tails.

    In a GUI context the average might be reported each time a new trial is done.

  4. Coin flips (4)

    Simulate the flipping of a coin repeatedly until five heads or tails have been flipped in a row.

  5. Coin flips (5)

    Simulate the flipping of a coin repeatedly until a user-specified number of heads or tails have been flipped in a row. (Be careful with values above 10.)

  6. Arithmetic flash cards

    Generate, present, and check & report correctness of flash card arithmetic drill and practice facts.

    As with coin flipping, one can vary the loop control/stopping mechanism. Possibilities include: repeating a fixed number of times;  repeating until a correctness threshold (e.g., 80%) has been reached with some minimal number of items presented (e.g., 10);  repeating trials of a fixed size until a trial has been completed with a prescribed accuracy rating.

  7. General flash cards

    Read a file of items and answers (e.g., states & capitals) into a data structure for drill and practice presentation. Randomly select an item, present it, accept a user's "answer", check it, and indicate correctness keeping track of counts of items presented and correct answers.

    As with coin flipping, one can vary the loop control/stopping mechanism. Possibilities include: repeating for a fixed number of items;  repeating until a correctness threshold (e.g., 80%) has been reached with some minimal number of items presented (e.g., at least 10 items with 90% correctness);  repeating trials of a fixed size until a trial has been completed with a prescribed accuracy rating.

    Also, items answered correctly could be moved to the end of the list and not asked again until all items have been correctly answered. And, with the addition of times-asked and times-correct values for each item one can focus attention on the items the user has had the most difficulty with (maintaining an ordering based on percent correct).

  8. Average score

    Input (from the user or a file) a set of scores and calculate and report the count and average of the scores.

  9. Standard deviation

    Input (from the user or a file) a set of scores and calculate and report the count, average, and standard deviation of the scores.

  10. Normal values

    Input (from the user or a file) a set of scores and calculate and report the count, average, and standard deviation of the scores. Then, reprocess the scores identifying that that are in the normal range, i.e., within one standard deviation of the average.

  11. Replace double blanks

    Examine a string value (or file) replacing all occurrences of contiguous space characters with a single space.

  12. First letters

    Build a string consisting of all the first letters of words in a given string or file of text. A word is set of non-blank characters. The first word in the string (or file or line) may or may not be preceded by a space.

  13. Last letters

    Build a string consisting of all the last letters of words in a given string or file of text. A word is set of non-blank characters. The last word in the string (or file or line) may or may not be followed by a space.

  14. Vowel count

    Given a string representing a word count the occurrence of vowels (a, e, i, o, u, y) in the word.

  15. Password strength

    Given a string representing a password calculate and report the strength of the password that depends on the number and type of characters used.

  16. String reverse

    Provide code that will accept a string value and produce and display the reverse of the string value, i.e., the characters in reverse order.

  17. String reverse (2)

    Provide code that will accept a string value and produce and display the reverse of the string value, i.e., the words as real words but in reverse order (the last word first).

  18. Pig latin

    Provide code that will accept a string of text and produces a string that contains the pig-latin version of each of the words in the original string.

  19. Train schedule (a spin-off of a Ben Schafer suggestion)

    Provide code that will take a beginning time (in AM/PM form), an ending time (in AM/PM form), and an increment value (in AM/PM form) and produce table of values starting with the given time that displays (in AM/PM form) all the time increments between the first time and last time.

  20. Syllable count

    Given a string representing a word provide code to count and report the syllables in the word using the Flesch reading scale. Computer-based analysis uses the following definitions:

    Periods, explanation points, colons and semicolons serve as sentence delimiters; each group of continuous non-blank characters with beginning and ending punctuation removed counts as a word; each vowel in a word is considered one syllable subject to: (a) -es, -ed and -e (except -le) endings are ignored; (b) words of three letters or shorter count as single syllables; and (c) consecutive vowels count as one syllable.

  21. Receipt preparation

    Values in a list (or array or listbox) have the form <item name/description> $###.##. Provide code that will examine the list and produce a string value containing each of the items with the price values aligned each on a separate "line" (followed by a new line character), a blank line, a labeled subtotal value, a labeled sales tax value, a blank line, and a labeled total value. (The string may be displayed on the screen or written to a file.)

  22. Poker: initialize deck

    Create a list/array of cards where the cards are represented as the numbers 0-51. Decide which numbers represent which suit & rank combination. Pick a random card position and report its suit and rank.

  23. Poker: shuffle

    Assume you have an array/list of numbers representing a deck of cards. Shuffle/randomize the deck. One way of doing so is to repeatedly:  1) pick a random position between "first" and "last";  2) swap the value there with the "last" value;  3) reduce "last" by 1. Keep doing this until the "last" becomes equal to "first".

  24. Poker: deal

    Assume hou have an array/list of numbers representing a shuffled deck of cards. Further assume you have a known number of players each of whom is to be dealt a hand of five cards. Starting at one end of the deck, deal the cards by filling the appropriate number hands with five cards (each hand will be an array/list). The top card should go to the first player, the next card to the second player, etc. Include a mechanism for showing each hand.

  25. Poker: sort hand

    Assume hou have an array/list of numbers representing a "hand" of five cards. Arrange the cards in order according to their rank. Include a mechanism for showing the hand before and after sorting.

  26. Hangman play

    Assume you have three string values representing the hangman game:  the word;  letters guessed  and solution. The solution starts out as a sequence of underscores. Provide code that accepts a new user guess and and appropriately updates the values of the letters guessed and the solution. Include a mechanism that shows the updated values.

  27. Choice validation

    Produce code that will repeatedly ask a user to enter a choice on a multiple choice quiz until an acceptable choice is entered. Acceptable choices are the letters A, B, C, D. If the user enters any other character or the lower case version of those letters the request is to be repeated.

  28. Caesar cypher

    The printable characters in the ASCII character set (used by computers in most English-speaking countries) begin with the space character and end with the tilde. Their numeric codes are 30 to 126. By subtracting 30 from those values we get 0-97 which can be readily used to "wrap around" when encoding and decoding with a Caesar cypher. Provide code that will take an ASCII string value and produce a result that shifts each character a user-indicated number of places (shift "up"). Check your work by using the same code to shift the code using the negative of the original shift value. the code should report the original string, the encoded string, and the decoded string.

  29. Steganography

    Devise a mechanism to hide a message in the lowest-order byte of the pixel data in an image. Your mechanism could include using only one color or using only certain pixels. Produce a program that would both place the message and retrieve it.

  30. Peeps (Thank you, David Moursund, circa 1977)

    Prepare a simulation of peep population. Peeps have consistent lives—birth, finding a mate, reproduction, enjoy life, die. They die at age 6 (or 8 or 10 or ...). At age 2 they mate, each pair having produced one offspring by the next year and another by/at age 4. The simulation can proceed for a fixed number or years or until the population stabilizes (perhaps at 0).

  31. ?

    ?

Final Exam Problems

We often include a complete but hopefully straightforward programming problem on the final exam. To us, such problems should address control structure categories (sequence, selection & repetition), file usage, and data (both simple variables and collections). Some examples are shown below.

  1. Place file data in one of two lists

    Read email addresses from a file and put each into one of two lists. Those containing uni.edu should be placed in one and all the others placed in another.

  2. Write list data to a file

    Examine all the elements in a list and write/copy the UNI ones (those that contain uni.edu) to a file. Write all the others to a separate file.

  3. Above & below average

    Read a set of integer values into an array from a file. Process the values to calculate the average, then process them again to count the number of items above average and the number of items below average. Report the average and the counts.

  4. Average word length

    Read text from a file to determine the average word length. Assume words will have one or more spaces after them. Do not include the punctuation characters of . , ? ; : ! at the "end" of a word as part of the length of the word.

  5. Word length counts

    Read text from a file and produce the counts of the various word lengths (count all words of length 15 or greater as a single length). Report the counts to the user.

  6. Sales receipt

    Process the items in a list in a pizza ordering app to prepare a receipt for the order. Each item in the list will have a description and a price. The price will be preceded by a dollar sign and be at the end of the list item. The receipt is to contain all the items in the order list, then a subtotal for the cost of everything, then a value for sales tax (7.5% of the subtotal, then a value for tip/gratuity (15% of the subtotal), and finally the overall total (subtotal + tax + gratuity). Each of ordered items and the last three values should have a description in front of the value. The receipt is to be written to a file.

  7. Username creation

    Assume you have a file of existing usernames (in alphabetical order, each followed by an id number) and a file of incoming personnel (lastname, firstname, middlename, & id number separated by spaces). Process the file of incoming personnel to produce usernames by concatenating the last name (or first 12 characters of it) with two initials and a number if needed to avoid duplicates. If the new name duplicates an existing username append and appropriate number on the end. The revised list of user names & id numbers should be written back out the the username file.

  8. ?

    ?

Projects

These problems are meant to exemplify the problems someone might choose to program on their own after having had a programming course. As part of a high school or University class students are taking, they would likely take several weeks to complete. Some problems are substantially less complex in some languages and may not be appropriate. The expectation is that all problems will use:

It is also assumed that project problems will be relatively involved algorithmically. Note that some of the projects are suitable for (perhaps only for) GUI-using systems. Also note that code for most projects will be available on the web. Some mechanism for ensuring that students develop their own code is essential, perhaps multiple check-in meetings to convince you that students know and produced the code.

Tool Apps

  1. Flash cards (with user-based item history)

    The program reads a set of questions/items and answers from a file into a collection. The user can choose to be anonymous or to have their own set of practice problems. Items will be selected and presented randomly.

    In anonymous mode, the program should provide the user a choice of ways to have the problems presented. Some possibilities are: repeat until I want to stop; repeat for a program-specified number of items, then let me choose to go again or stop; repeat until I get some percentage correct with some minimum number of items; ...

    In known-user mode, correctly answered items will be move to the end of the list and not asked again until all items have been answered correctly. The user is allowed to stop when desired and the program will store the items in a file associated with the user. When next the same user runs the program, their personalized problems with history will be used rather than the initial set of problems.

  2. Text tools

    A collection of tools that includes: character count, word count, frequency distribution on characters, frequency distribution on word lengths, Flesch-Kincaid reading level score, and, if the language readily allows, a frequency distribution of words and automatic suggestion of stop words and key words.

  3. Class attendance & participation checkoff

    A teacher might like to have program that shows students names in their relative locations in the classroom. The program should allow the teacher to initialize several classes. Thereafter, the teacher can call up a class, mark students as absent or present, revise the attendance record (e.g., a student came in late), and enter participation plusses and minuses. Participation scoring should allow for multiple entries which can be either of a common/standard amount or some multiple of that amount.

  4. User name generation

    This program has two kinds of users. The system administrator will run the program periodically to produce usernames for a number of new employees that arrive at the same time. Alternatively, users (or the sys admin) will enter an individual name and id number to generate the default username or a personalized one of their choice. A file of usernames and id numbers exists and should be used to ensure that duplicate usernames (for e-mail addresses) do not occur. The username & id file will initially be in alphabetical order by username and is to be so ordered after operation.

  5. Pizza order app

    A user (customer or server) uses the app to specify pizzas — size, crust, type or build-your-own (with selected toppings — in an order. The order may be revised before submission. Drinks and side dishes should also be included. Item names and prices should read from a file (to allow for changes without coding). Order forms (items ordered, for use by the preparers) and receipts (showing items, prices, subtotals, & tax) should be produced and written to a file (for printing).

Games

  1. Craps

    One player (the shooter) and (probably) restricted bet types. The program should have the user enter a bank amount and proceed to play. Bet types of pass and don't pass are to be provided (add others if you wish). During play the program should record each bet type and amount and the outcome (won in come out, lost in come out, point make, point not made). When play is over the game should process the record of play to produce an audit trail indicating starting time, number of rounds, number of bets, number of bets won, number of bets lost, amount won, amount lost, and ending time. [This is expected to use a GUI interface.]

  2. Blackjack arcade game

    One player against the computer dealer. The program should have the user enter a bank amount and proceed to play. During play the program should record each bet amount, any alterations to the bet (e.g., doubling down, split pair), and the outcome. The deck is reshuffled after each hand. The player may split pairs or double down without limit. When play is over the game should process the record of play to produce an audit trail indicating starting time, number of hands, number of bets, number of bets won, number of bets lost, amount won, amount lost, and ending time. [This is expected to use a GUI interface.]

  3. Poker arcade game

    One player and a particular game, e.g., Jacks or Better. The program should have the user enter a bank amount and proceed to play. During play the program should record each bet amount, the user's play (initial cards and draw), and the outcome. The deck is reshuffled after each hand. A payout table should be followed by the program and be available to the user for viewing. When play is over the game should process the record of play to produce an audit trail indicating starting time, number of hands, number of bets, number of bets won, number of bets lost, amount won, amount lost, and ending time.

  4. Connect Four

    Player against the computer. The program should include directions to the user and at least two levels of computer play—purely random and defensive (works to block 4 in a row). Results (user, date, games played, games won, average game time) should be recorded for each run. Users should be able to see a report of their history.

  5. Concentration

    The game can have two players or just one player. For a single player there should be a mechanism for winning & losing (too much time, too many incorrect guesses, ...). The program should provide directions to the user(s) if desired. Results should be recorded: for single players—user, date, times played, times won, average game time—and for pairs—users, date, user1 wins, user2 wins, average game time. Users should be able to see a report of their history.

  6. Yahtzee

    The game can have one or more players. The program should provide directions to the user(s) if desired. Results should be recorded by player (games played, high score, low score, average score). A set of high scorers should also be filed and updated as necessary. Users should be able to see a report of their history.

Data Processing

  1. Web crawler

    Assume we have a master list of URLs that includes the URL and the date it was last checked/crawled. Check the web page in a file of URLs appending any new URLs as appropriate to the the master list/file and the to-check list/file. While doing so, provide a separate file containing URLs of pages that meet the user-specified criteria, e.g., include particular words, have more than a specified number of links (or other characteristic), include particular HTML tags (tables, mail-to's, etc.). Avoid checking pages that have not changed since last crawled and update the timestamps in the master list of crawled pages.

  2. Climate data analysis

  3. Encryption/Decryption (1)

    After exploring the notion of cryptography, create you own system for encoding a message.

  4. Encryption/Decryption (2)

    After exploring public-key cryptography, develop a program that implements that activity.

  5. ?

    ?