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
eg-259:lecture6 [2013/02/07 21:08] – [Exercises] eechriseg-259:lecture6 [2013/02/07 21:09] (current) – [Exercises] eechris
Line 776: Line 776:
  
   - //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.1360271295.txt.gz · Last modified: 2013/02/07 21:08 by eechris