Lesson 03

Repetition (loops), Nested Loops, Random Numbers

Individual Post-Class Exercises
  1. Lesson Setup
    This is stuff you'll need to download and/or browse before starting this lesson

    1. Start-of-lecture Slides (Required)
      Online students will need to read these on their own. 
      Hybrid students will seem them at the start of class.
    2. Starter project for the lesson 03 PCEs (Post-Class Exercises) 
    3. Watch the online videos for this lesson and demonstrate your knowledge (Hand-In)
      You can download a .ZIP of all the videos for this lesson from Microsoft's OneDrive website by opening the folder (click this link to open the folder), then clicking on the "Download" menu item.
      In future lessons this link will be referred to as "Download all videos for this lesson".

  2. Repetition (Loops)

    1. VIDEO: While Loops

    2. VIDEO: For Loops

    3. VIDEO: Do-While Loops

    4. Exercise: Simple loops - while, for (While: Sect. 5.5, 5.7 For: 5.6, 6.2, 6.3, 6.4)
    5. Exercise: keywords: break / continue (Section 6.7) 
    6. Exercise: Sentinel-controlled loops: Averaging numbers (Sect. 5.7) 
    7. Exercise: Printing A Range Of Numbers (Previous Knowledge) (Hand-In)
  3. Some More Operators ; C# Math Functions

    1. VIDEO: Increment (++) and decrement (--) operators

    2. VIDEO: Compound assignment operators (+=, *=, etc)

    3. Exercise: Compound Assignment operators (Section 5.9), Increment / Decrement operators (Sect. 5.10) 
    4. Exercise: Built-in Math functions  (Hand-In)  (Sect. 7.3) 
  4. Random Numbers

    1. Files: Random numbers, manually bounded   (Demo File)

    2. VIDEO: Random Numbers: Seed Values

    3. VIDEO: Random Numbers: the .Net-specific .Next(min, maxPlusOne) method

    4. VIDEO: Random Numbers: Seed Values & non-random numbers

    5. VIDEO: Random Numbers: Using the plain .Next() & modulus ( % )

    6. Exercise: Basic Random Number Generation (Sect. 7.9 (Shift/scale: 7.9.1)) (Hand-In)
  5. Nested Loops

    1. VIDEO: Nested Loops Demo Video   VS Project Used in the Video (There is no viewing quiz for this)
    2. Exercise: Nested Loops: Rectangles  (Sect. 5.8)
    3. Exercise: Nested Loops: Hollow Rectangles (Sect. 5.8) (Hand-In)
  6. Study Skills
    What to do when you get overwhelmed: Pre-emptive stuff
    Google / Bing
    Get help - study groups, tutor, teacher
    Try different books,
    Video tutorials, etc

  7. Final Steps
    A couple last steps, then you'll be done with your work for this lesson.

    1. Web Hand-In for post-class exercises and for homework:
      Go to the StudentTracker  web app, and create an account for yourself, and then "enroll" in the course.
      (There's a link to StudentTracker on the main page for this course)
      Please submit a .ZIP (and ONLY a .ZIP - not a .RAR, .7z, etc) that contains the Program.cs file, the video outline/viewing quiz .DOCX (or .PDF), any other files you wish to include, and leaves out every thing else (as much as possible).

      1. Remember that you can use an extension to hand in your work slightly late (see the lecture 1 slides for details).
        Once you get the feedback (the grade) from the instructor you have a limited time to email your missing work to the instructor (make sure to tell the instructor that you're using an extension). 
        You can use an extension if you forgot to hand in the entire .ZIP file, and you can  use the extension if you forgot to include an entire, specific file.  You CANNOT use an extension to revise work that you submitted and got a grade on.

        This is true as long as you have extensions left; this week is the last time that this notice will be posted

    2. Make sure that you're working on the next homework assignment.
      Details are listed on the
      homework assignment page.
      The due date is listed on the main page.
    3. Practice what you've learned
      Remember that in order to really learn this stuff you're going to need to practice it.  Go back and redo the exercises from this lesson until you've really got it down.  Go back to the prior lesson(s) and review and redo that.  Make sure that you've really got this stuff in your head (and remember that it gets easier each time you redo the work)!
 
 
In-Class Materials:

These materials are used by students in the hybrid class during leture time.  Online students can safely ignore everything in this 'In Class Materials' box.

In-Class Materials:

Instructor's Materials:

Videos recorded during class (of the In-Class Exercises):