Using a Web browser and a little knowledge of JavaScript, even novice non-majors can do nifty things.
- can use prepackaged Web pages as tools for exploration, problem-solving, and experimentation
- can write and/or modify JavaScript programs to create interactive Web pages
These materials were developed for a CS0 course, taught at Dickinson College and Creighton University (see www.creighton.edu/~davereed/cs0).
Overall philosophy:
- provide a balance between computing breadth and programming depth
- utilize JavaScript and Web page development to provide a simple, fun environment for programming and design
- emphasize programming as a tool for interdisciplinary problem-solving and experimentation
Dickinson course: 70% programming
covers variables, assignments, functions, events, conditionals, loops, objects
Creighton course: 50% programming
covers variables, assignments, functions, events, conditionals
- instructor can provide prepackaged programs in the form of Web pages
- students can access them from any Web-connected computer
- laboratories emphasize using programs to collect data, study systems, analyze results, formalize explanations
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]
- students can begin to write simple, interactive pages right away
- JavaScript's ties to HTML make the integration of images, buttons, etc. relatively easy
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]