Northcentral Technical College Introduction To Programming
10-152-310
Introduction to Programming with JavaScript NTC 10-152-310

Learning Plan 5 5.1 Assignment 2

# 5.1 Assignment 2

#### File: /Learning Plan 5/5.1assignment2.html

### Student

- Name:
- Section:
- Email:

## Part 1

1. Open this file in Firefox and Microsoft Visual Studio
2. Add your name, section, and email
3. Open the file "/Learning Plan 5/jsFiles/5.1assignment2.js"
4. Locate the function named "assignment51_2Part1()".
5. Add code after the line: `// PART 1: YOUR CODE STARTS AFTER THIS LINE:` to complete the exercise.

### Part 1 Problem Statement

> Write a program that outputs the numbers 1 through 50. Next to each number, output the value that is half of the number, and then output the value that is one quarter of the number. Format the output as in the sample output. Use a `for` loop for this part.

- Sample Part 1 Output (Partial):

    1, 0.5, 0.25
    2, 1, 0.5
    3, 1.5, 0.75
    4, 2, 1
    5, 2.5, 1.25
    ...

### Part 1 Program Planning Lists

* In the following pre tag, write the three planning lists based on the verbs and nouns you see in the problem statement.

    The List of Input Variables:

    The List of Output Variables:

    The Process Checklist:

### Part 1 Test Plan

    TEST PLAN:

    Test Case 1:
        Inputs:

        Expected Results:

    Test Case 2:
        Inputs:

        Expected Results:

    Test Case 3:
        Inputs:

        Expected Results:

    Test Case 4:
        Inputs:

        Expected Results:

### Your Part 1 Output:

## Part 2

1. Locate the function named "assignment51_2Part2()".
2. Add code after the line: `// PART 2: YOUR CODE STARTS AFTER THIS LINE:` to complete the exercise.

### Part 2 Problem Statement

> Write a program that asks a user to enter a number. Then ask the user to enter a number bigger than the first number. Multiply all the numbers from the first number to the second and output the results as in the sample output. Use a `for` loop for this part.

- Sample Part 2 Output:

    2 * 3 * 4 * 5 = 120

    1 * 2 = 2

    1 * 2 * 3 = 6

### Part 2 Program Planning Lists

- In the following pre tag, write the three planning lists based on the verbs and nouns you see in the problem statement.

    The List of Input Variables:

    The List of Output Variables:

    The Process Checklist:

### Part 2 Test Plan

    TEST PLAN:

    Test Case 1:
        Inputs:

        Expected Results:

    Test Case 2:
        Inputs:

        Expected Results:

    Test Case 3:
        Inputs:

        Expected Results:

### Your Part 2 Output:

### Submitting your work

- Zip and subbmit 5.1 Assignment 2
- Don't forget to also zip and submit your JavaScript file 5.1assignment2.js.
- Make sure that both files are zipped and submitted together.