--Originally published at estefilangarica.wordpress.com
Author: estefilangarica
To- Do List
--Originally published at estefilangarica.wordpress.com
- Use of comments
- C++ Good Style coding conventions
- Basic types and their use
- Basic output (print)
- Basic user input (text based)
- Calling functions
- Creating functions
- Importing and using libraries
- Creating and using your own libraries (program with multiple files)
- Use of the conditional “if”
- Use of “else” with a conditional if
- Nesting of conditional statements (ifs inside ifs)
- Use of loops with “while” and “do while”
- Use of loops with “for”
- Nested loops
- Use of recursion for repetitive algorithms
- When to use what type of repetition in a program
- Creation and use of Arrays/Vectors in C++
- Creation and use of strings
- Validated user input (ensure correct/expected data entry)
- Reading and writing of text files
- Matrixes and Vectors
- Data analysis with tools (to be determined which tool, most likely SciLab)
- Visualization of data with tools
Quiz 5. Programming exercises
Lists
--Originally published at estefilangarica.wordpress.com
Seventh Activity
The assignment Ken gave us was the following:
Create a program that asks the user for 10 numbers (floating point). Store those numbers in a list. Show to the user the total, average and standard deviation of those numbers.
Factorial Calculator
--Originally published at estefilangarica.wordpress.com
Sixth Activity
The assignment Ken gave us was the following:
Create a program that asks the user for a non-negative integer (let’s call that number n) and display for them the value of n! (n factorial).
After showing them the answer, ask them if they would like to try another number (with a simple y/n response) and either ask again (for y) or quit the program and wish them a nice day (if they answered n).
On To Functions
--Originally published at estefilangarica.wordpress.com
Fifth Activity
The assignment Ken gave us was the following:
You will go back and do WSQ01 – Fun with Numbers again.
But this time, write a function for each calculation. Each function should define two parameters (in this example of type int) and return the correct value as an integer as well.
You main program needs to ask the user for the input and then call each function to calculate the answer for each of the parts.
Sum of Numbers
--Originally published at estefilangarica.wordpress.com
Fourth Activity
The assignment Ken gave us was:
Write a program that asks for a range of integers and then prints the sum of the numbers in that range (inclusive).
You can use a formula to calculate this of course but what we want you to do here is practice using a loop to do repetitive work.
Quiz 4. Minimum and Squares
--Originally published at estefilangarica.wordpress.com
The instructions of the quiz where:
Create a program with two functions:
- int minimumThree(int x, int y, int z){ } // returns the value that is smallest of x, y and z
- int sumSquares(int x, int y, int z) {} // returns the value of the sum of squares of x, y, z
You should make a main routine that asks the user for three numbers and then calls your functions to which should *RETURN* the value and you print in the main program.
Functions Quiz 3
Hello World!
--Originally published at estefilangarica.wordpress.com
Compiling my first program was challenging because I didn’t know how to do it, so I asked Ken and he helped me. When I was ready to run I couldn’t because there was an error, I forgot to use a semicolon after “return 0”. After correcting the error everything worked as it was supposed to. What I really liked is that they tell you where is the error and what is missing.
Code: