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

Learning Plan 5 5.1 Assignemnt 1

# 5.1 Assignment 1

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

### Student

- Name:
- Section:
- Email:

## Part 1

1. Open the file "/Learning Plan 5/jsFiles/5.1assignment1.js".
2. Locate the function named "assignment51_1Part1()".
3. Add code after the line: `// PART 1: YOUR CODE STARTS AFTER THIS LINE:` to complete the exercise from the problem statement.

### Part 1 Problem Statement

> Write a JavaScript program that outputs the numbers `1` through `30`. For each number also output the square of the number and the cube of the number. Format the output as in the partial sample output.

#### Sample Part 1 Output (Partial):

    1, 1, 1
    2, 4, 8
    3, 9, 27
    ...

### 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:

#### Your Part 1 Output

## Part 2

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

### 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. Calculate a value that is the sum of all the numbers from the first number to the second number including the end points. For example, if the user enters 5 and 10 then calculate the total of 5 + 6 + 7 + 8 + 9 + 10. Display the results as in the sample output. Use a `while` loop for this part.

#### Sample Part 2 Output:

    5 + 6 + 7 + 8 + 9 + 10 = 45

### 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 submit 5.1 Assignment 1
- Don't forget to also zip and submit your JavaScript file 5.1assignment1.js.
- Make sure that both files are zipped and submitted together.