Introduction To Programming
10-152-310

Learning Plan 2 : Variables and Data Types

Student

  • Name:
  • Section:
  • Email:

2.1 Project - Part 4

  • Open this file in your browser and Microsoft Visual Studio
  • Add your name, section, and email

Problem Statement

Write a program that receives five strings into variables. The program calculates the length of each string and stores the length into variables. For each entered string the program will output a line like the sample output below.

Hint: Review this if you've forgotten how to get the length of a string: The length function

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

JavaScript Output

Write the JavaScript code based on everything you've done. Your code must follow the course coding standards.

  • Sample Output
    length: 11, "This string"
    length: 26, "Here's another nice string"
    length: 5, "short"
    length: 56, "How about a very long string that seems to go on and on."
    length: 2, "hi"
  • Part 4 Output: