Introduction To Programming
10-152-310

Learning Plan 3 : Math and Operators

Student

  • Name:
  • Section:
  • Email:

Part 1

  1. Open this file in your browser and Microsoft Visual Studio
  2. Add your name, section, and email
  3. Add code after the line: // PART 1: YOUR CODE STARTS AFTER THIS LINE: to complete the exercise.
  4. Pick a number, any old one will do.
  5. In a set of document.write(); statements compare the number with the same number with all of the relationship operators.
  6. Display each comparison as shown in the sample output.

Sample Part 2 Output:

        (10 < 10) is false
        ...

Your Part 1 Output:


        

Part 2

  1. Add code after the line: // PART 1: YOUR CODE STARTS AFTER THIS LINE: to complete the exercise.
  2. Here we're going to compare a number with its string version. An example would be the number 10 compared to the string "10".
  3. Just like in part 1, use all the relationship operators in a set of document.write() statements.
  4. Is there any difference between the output of the two parts?

Sample Part 2 Output:

        (10 < "10") is false

Your Part 2 Output: