Nifty Assignments - SIGCSE 2002

David Reed
Creighton University
davereed@creighton.edu
www.creighton.edu/~davereed


Actually, more of a nifty idea:

Using a Web browser and a little knowledge of JavaScript, even novice non-majors can do nifty things.




A little context:

These materials were developed for a CS0 course, taught at Dickinson College and Creighton University (see www.creighton.edu/~davereed/cs0).


Overall philosophy:


Dickinson course: 70% programming
     covers variables, assignments, functions, events, conditionals, loops, objects
Creighton course: 50% programming
     covers variables, assignments, functions, events, conditionals




The Web provides an intuitive interface for programs


Word Frequency: given a Web-based program that generates random letter sequences, try to estimate the number of 3-letter words in the English language.
[assignment] [randSeq.html]

Random Walk: given a Web-based program with simple turtle graphics, study 2-dimensional random walks and consider a constrained variant.
[assignment] [Turtle.html] [Walk.html]

Prisoner's Dilemma: given a Web-based program for simulating repeated Prisoner's Dilemma transactions, compare the various strategies and model a competitive ecosystem using a round-robin tournament.
[assignment] [dilemma.html]




JavaScript allows students to develop professional-looking programs with minimal effort


Mad Lib: develop a Web page that serves as a Mad Lib, prompting the user for specific types of words and displaying a story with those words. (Assumes: variables, prompt function, write statement)
[assignment] [madlib.html]

Magic 8-ball: develop a Web page that simulates a Magic 8-ball, with text areas for the user to enter their question and receive a response. (Assumes: variables, random selection; text area, text box, button)
[assignment] [magic.html]

Slot Machine: develop a Web page that simulates a slot machine, allowing the user to spin the wheels at the click of a button while keeping track of winnings. (Assumes: variables, counters, random selection, conditionals; text box, button, image)
[assignment] [slots.html]