Name (Last, First): | ________________________ |
StudentID: | __________________ |
Section: | ________ |
Print out your page and write your answers to the following questions. Use a separate sheet of paper if you need more space. The last problem requires an additional sheet of paper. Be sure to put your name, student ID, and section at the top of this page, on any attached pages, and securely fasten all sheets together with a staple. You may lose points if you do not do so! Have fun. [30 points total points!]
Concepts | |
1. |
Algorithms [10 points total] a. In your own words, clearly explain what an algorithm is. [3 points]
|
2. |
What is/are the benefit(s) of having functions? Why not just write all the code out in the place
|
Javascript | |
For some of the following problems, it may behoove you to run it by creating an HTML page and placing the code in that page and loading it in Mozilla (and possibly using the Javascript Console), or by using W3School’s TryIt Editor (http://www.w3schools.com/js/tryit.asp?filename=tryjs_text) to test what the code does. | |
3. |
Why will the Javascript code below not work? How should it be fixed? [3 points]
|
4. | I have a variable called myGrade that stores a number. Write an if-else statement that will give Note: 3 points for perfect! 1 point for almost correct if-else block. 1 point for the correct boolean
|
5. | Pretend you are writing the following code for an assignment. Copy and paste it somewhere, and
|
Collect all of the following pages and staple them together. You can't be sure there will be a stapler in the lecture hall, so staple before you come to class! Bring the package to class on Monday, October 30th , and turn it in at the beginning of class. Keep in mind what the syllabus says about missed homework. (Be sure your name and section are on anything you turn in, whether or not that is mentioned specifically.)