Read through a little intro and try out the exercises I've uploaded here:
Wednesday, August 27, 2008
Monday, August 11, 2008
Inclement whether prevents my attendance in person, but I'm with you in (e)spirit.
Fully read up?
Try these interesting exercises (in groups, or as a hard old loner)...
conditionals1.htmlin your favourite editor.
In this exercise, you'll write a function called guessAge() that, oddly enough, lets the user guess your age. The user's guess is in document.ageForm.ageGuess.value. The guessAge() function should pop up an alert box telling the user whether or not s/he guessed correctly.
conditionals2.htmlin your favourite editor. You can copy your completed
conditionals2.htmlif you'd like to edit your existing work rather than starting from scratch.
In this exercise, you'll modify your age guesser from exercise #1 to provide some additional feedback to the user. The guessAge() function's alert box should let the user know if s/he guessed correctly, if you're younger than the guess, or if you're older than the guess.
conditionals3.htmlin your favourite editor.
Everyone knows that flowers need water to grow. This HTML page has a watering can and a flower. This particular flower needs to be watered three times before it can grow. When the user clicks on the watering can, it should change to the image
shower.jpg. After one second, the watering can should stop watering the flower. (We provide this code for you; read the comments in the program carefully.) The third time the user waters the flower, the flower should bloom. (There's an image of a bloomed flower in
Image: '"It is our choices. . . that+show+what+we+are,++far+more+than+our+abilities."'
Posted by Peter Shanks at 9:38 am
Sunday, August 10, 2008
So far we've worked through the following sections:
3.1. What are Variables?
3.2. Values of Variables
3.3. Data Type Conversion
4.2. Floating-point literals
4.3. Boolean literals
4.4. String literals
4.5. Escaping characters
6.1. Selected assignment operators
6.2. Comparison operators
6.3. Selected Arithmetic Operators
6.4. Logical Operators
8.1. Defining a Function
8.2. Calling a Function
We also applied ourselves to the following exercises:
Posted by Peter Shanks at 9:16 am