User Tools

Site Tools


eg-259:lecture6

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eg-259:lecture6 [2013/02/07 21:03] – [Constructors] eechriseg-259:lecture6 [2013/02/07 21:09] (current) – [Exercises] eechris
Line 773: Line 773:
 ===== Exercises ===== ===== Exercises =====
  
-Write, test and debug (if necessary) XHTML files that include JavaScript scripts for the following problems. When required to write functions, you must include a script to test the function with at least two different data sets.+Use jsFiddle or some other method to write, test and debug (if necessary) HTML files that include JavaScript scripts for the following problems. When required to write functions, you must include a script to test the function with at least two different data sets.
  
   - //Output//: A table of numbers from 5 to 15 and their squares and cubes, using alert.   - //Output//: A table of numbers from 5 to 15 and their squares and cubes, using alert.
-  - //Output//: The first 20 Fibonacci numbers, which are defined as in the following sequence 1, 1, 2, 3, … where each number in the sequence is the sum of the two previous numbers. Use ''document.write'' to produce the output.+  - //Output//: The first 20 Fibonacci numbers, which are defined as in the following sequence 1, 1, 2, 3, … where each number in the sequence is the sum of the two previous numbers. Use ''console.log'' to produce the output.
   - Modify the script of Exercise 2 to input a number, //n//, using ''prompt'', which is the number of the Fibonacci number required as output.   - Modify the script of Exercise 2 to input a number, //n//, using ''prompt'', which is the number of the Fibonacci number required as output.
   - //Function//: ''no_zeros''; //Parameter//: An array of numbers; //Result//: The array must be modified to remove all zero values. //Returns//: ''true'' if the given array included zeros; ''false'' otherwise.   - //Function//: ''no_zeros''; //Parameter//: An array of numbers; //Result//: The array must be modified to remove all zero values. //Returns//: ''true'' if the given array included zeros; ''false'' otherwise.
eg-259/lecture6.1360271006.txt.gz · Last modified: 2013/02/07 21:03 by eechris