Week 3 - Library Functions and Chars
Learning Objectives
Upon finishing this learning module, you should be able to:
- Use standard library functions to do math and work with characters
- Generate pseudorandom numbers for a desired range
- Use the char data type and understand how it relates to int
- Navigate directories and compile files from the command line
Schedule
Day 1
- Using math functions and random numbers
- CPP Lab Math Functions
- Check out the assignment
Day 2
Day 3
Day 4
- Get math help if needed and do assignment
- Review & Take Quiz
Using Functions
Read Ch 4.1 and 4.2. These videos explain some of the basics:
Do Numeric Functions CPP Lab .
Random Numbers
Read 3.9 on random numbers. This video explains some of the basics:
Chars
Read Ch 4.3-4.7. This video explains a bit about chars
Do Characters CPP Lab .
Working on the Command Line
Before there were windows and mice, the way we interacted with computers was all based on text input into consoles (like the programs we are currently writing). Many tools programmers use work on the command line (behind the scenes, VSCode is using text-based commands to call the compiler) - learning to use the command line is essential.
In parallel with the assignment, do the following activities to start getting familiar with the command line.
These videos demonstrate the basics:
This Command Line Guide provides detailed instructions for how to open a command prompt, set up the path, navigate, and use g++.
For a more detailed treatment read either this Windows command line guide (up to 2.6). or this Mac/Linux command line guide (up to 3.5).
Quiz
The quiz will be open Thursday–Saturday in Elearn, time limited (60 minutes), and not collaborative. It covers weeks 1 & 2. Make sure you block out an hour of uninterrupted time before you start the quiz — you can not pause the timer once you start.
To practice, go to the Resource Links and look for "Practice Quiz Questions".
For quiz 1, focus on Ch1, 2, and 3 (especially 2 and 3) to get ready for the quiz. The quiz will be some multiple choice, some short answer, and some writing code. Make sure to read the directions carefully before beginning.