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

Learning Plan 4 4.3 Lab 1

# 4.3 Lab 1

#### File: /Learning Plan 4/4.3lab1.html

### Student

- Name:
- Section:
- Email:

### Lab Steps

1. Open this file in Firefox and Microsoft Visual Studio
2. Add your name, section, and email

### Lab problem statement

> Write a program that asks a user to enter a number between 1 and 100 that does not include the end points. When a number in the correct range is entered then output the number and a message indicating success. If the number is not in the range then output the number and ask the user to try again.

### Lab Steps

1. Open this file in Firefox and Microsoft Visual Studio.
2. Add your name, section, and email.
3. Add code after the line: `YOUR CODE STARTS AFTER THIS LINE:` to complete this lab.
4. Your output should look like the Example Output below.
5. Variable declarations section
   1. Write a comment that identifies this coding section.
   2. Declare a variable that holds a number.
   3. Declare a variable that holds the low endpoint of the range.
   4. Declare a variable that holds the high endpoint of the range.
6. Assignments section
   1. Write a comment that identifies this coding section.
   2. Ask the user to enter a number between 1 and 100 that does not include the end points of the range and store it in the number variable.
   3. Convert the input to a number.
   4. Assign 1 and 100 to the low and high endpoint variables.
7. Logic and Ouput section
   1. Write a comment that identifies this coding section.
   2. Use only variables in your logic.
   3. If the entered number is in the range then output a success statement.
   4. If the number is out of the range then output a request to try again.

### Test Plan

    TEST PLAN:

    Test Case 1:
        Inputs:

        Expected Results:

    Test Case 2:
        Inputs:

        Expected Results:

    Test Case 3:
        Inputs:

        Expected Results:

### Example Output

    The number 75 is in the right range.

- OR

    The number 200 is out of the range, please try again.

### Your Output:

### 4.3 Assignment 1

- Here is the exercise that goes with this lab.
  - 4.3 Assignment 1