Introduction To Programming
10-152-310

Learning Plan 3 : Math and Operators

Student

  • Name:
  • Section:
  • Email:

Lab Steps

  1. Open this file in your browser and Microsoft Visual Studio.
  2. Add your name, section, and email.
  3. It is pronounced "YEW-nair-y".
  4. Add code after the line: YOUR CODE STARTS AFTER THIS LINE: to complete this lab.
  5. Your output should look like the Example Output below.
  6. Variable declarations section
    1. Write a comment that identifies this coding section.
    2. Add the following variables:
      1. myCount
      2. dayOfMonth
      3. year
      4. loopCounter
      5. whatAmIOne
      6. whatAmITwo
      7. whatAmIThree
  7. Assignments section
    1. Write a comment that identifies this coding section.
    2. Assign the following data to the variables created in the previous section.
      1. myCount --> 10
      2. dayOfMonth --> 21
      3. year --> 2009
      4. loopCounter --> 0
      5. whatAmIOne --> "this is just a test"
      6. whatAmITwo --> 25
      7. whatAmIThree --> (5 >= "5")
  8. Calculations section
    1. Write a comment that identifies this coding section.
    2. Using ONLY unary operators change the value of each of the variables with the following:
      1. adding 1 to myCount
      2. subtracting 1 from dayOfMonth
      3. subtracting 3 from year
      4. testing whatAmIOne for its type
      5. testing whatAmITwo for its type
      6. testing whatAmIThree for its type
  9. Output section
    1. Write a comment that identifies this coding section.
    2. Output the variables with text as in the following example.

Example Output

        adding 1 to myCount: 11
        subtracting 1 from dayOfMonth: 20
        subtracting 3 from year: 2006
        whatAmIOne is a "string"
        whatAmITwo is a "number"
        whatAmIThree is a "boolean"

Your Output: