Post of the weeks #6,7,8,9 and 10 what things I learned in these weeks ? And Index of Mastery Topics

--Originally published at Solving Problems with Programming

Picture of author

First let me tell you that  I learn and achieved all transversal topics and you can see it in the following link: Post of the week #3 what things i learned in this week #3 ? And Index of Mastery Topics

I also explain my project and formed a small team that corresponds of completing this ability to create C++ project in IDE and run inside the IDE and can be explained in my post My Project For the Course TC1017 and Expo Ing. Let’s code!

Futhermore, I am going to present the report of all the Mastery Topics achieved in this week:

  1. #Mastery01 Use of comments, achieved in: Post of the week #2 what things i learned in this week #2 ?
  2. #Mastery02 C++ Good Style coding conventions, achieved in: Post of the week #2 what things i learned in this week #2 ?
  3. #Mastery03 Basic types and their use, achieved in: Post of the week #2 what things i learned in this week #2 ?
  4. #Mastery04 Basic output (print), achieved in: Post of the week #2 what things i learned in this week #2 ?
  5. #Mastery05 Basic user input (text based), achieved in: Post of the week #2 what things i learned in this week #2 ?
  6. #Mastery06 Calling functions, achieved in: #Quiz03. Also here:#WSQ08 Yo soy 196 11/03/17 and WSQ08.cpp
  7. #Mastery07 Creating functions, achieved in: #Quiz03. Also here: #WSQ08 Yo soy 196 11/03/17 and WSQ08.cpp
  8. #Mastery08 Importing and using libraries, achieved in: Post of the week #1 what things i learned in this week #1 ? Also in #WSQ08 Yo soy 196 11/03/17 and WSQ08.cpp
  9. #Mastery09 Creating and using your own libraries (program with multiple files), achieved in: #Quiz03. Furthermore, also in here: #WSQ08 Yo soy 196 11/03/17 and WSQ08.cpp
  10. #Mastery10 Use of the conditional “if”,
    Continue reading "Post of the weeks #6,7,8,9 and 10 what things I learned in these weeks ? And Index of Mastery Topics"

#WSQ08 Yo soy 196 11/03/17 and WSQ08.cpp

--Originally published at Solving Problems with Programming

PICTURE OF ACTOR

So in this nine week class I started with doing this WSQ09. I started reviewing in creating and calling functions in C++.#Mastery06, #Mastery07, #Mastery16 Use of recursion for repetitive algorithms, #Mastery17 When to use what type of repetition in a program, #Mastery18 Creation and use of Arrays/ Vectors in C++. Futhermore, in this WSQ assignment we have mostly all the topics of the course from 1 to 20.

What I did for this numeric program is solving the problem to the user by creating a program that asks the user for two pieces of data:

  • The lower bound of the sequence
  • The upper bound of the sequence
Then you check the values from the lower bound (inclusive) to the upper bound (inclusive) and make a report of them. During the analysis of each number, if a Lychrel number is found it should be reported immediately with something like “Found a Lychrel number: 196”
The report must show:
  • The range of numbers analysed (lower to upper bound)
  • The number of natural palindromes (no addition to inverse needed)
  • The number of non-Lycherels encountered (become palindromes)
  • The number of Lycherel number candidates (that did not converge to palindrome)

Since you will not be able to prove that a number is Lycherel (since you cannot computer forever to check), our definition for a Lycherel candidate will be if a number does not converge after 30 iterations of applying the addition to the inverse.

To get this working well, you will need support for Big Integers. So I need to use that library that my teacher  ken bauer has given to me, here you go:

This link is for Library of Big Integer provided by ken bauer

Hence, the resources I need it to solve this program are here:

ken bauer

Similar code provided for

wsq8v2
wsq8v3
wsq8v4
wsq8v5
wsq8v6
wsq8v7
wsq8v8
yo soy 196
Continue reading "#WSQ08 Yo soy 196 11/03/17 and WSQ08.cpp"

#WSQ09 Multipart Data and Files 10/03/17 and WSQ09.cpp

--Originally published at Solving Problems with Programming

PICTURE OF ACTOR

So in this nine week class I started with doing this WSQ09. I started reviewing in creating and calling functions in C++.#Mastery06, #Mastery07, #Mastery16 Use of recursion for repetitive algorithms, #Mastery17 When to use what type of repetition in a program, #Mastery18 Creation and use of Arrays/ Vectors in C++.

Futhermore in this assignment we have two new mastery topics covered #Mastery19 Creation and use of strings and #Mastery21 Reading and writing of text files.

What I did for this numeric program is solving the problem to the user by writing a function that receives as parameter the name of a file (this would be a string value like data.txt) and this function counts the number of lines and the number of characters in the file which it returns as a single value (but with two values). I will want to look at how to create/define and return a struct value from a function and how to open and read text files line by line.

Hence, the resources I need it to solve this program are here:

ken bauer

How to convert string to char

C++ Tutorial for Beginners 43 – How to Read from a .txt file using C++

The following photograph shows the solution to this problem:

wsq9v1

wsq9v2wsq9v3wsq9v4

Picture of author

So at first I wrote the same structure of the program just did the same as what i did in Hello World: Second Class, Second Blog (Blog of the second class 12/01/17) and Hello World.cpp,  #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp#WSQ02 Post Temperature 23/01/17 and WSQ02.cpp#WSQ03 Post Pick a Number 23/01/17 and WSQ03.cpp#WSQ04 Post Sum of Numbers 23/01/17 and WSQ04.cpp#WSQ05 Six Tutorial On To Functions 12/02/17 and WSQ05.cpp#WSQ06 Factorial

charactes
Continue reading "#WSQ09 Multipart Data and Files 10/03/17 and WSQ09.cpp"

#WSQ07 Lists 03/03/17 and WSQ07.cpp

--Originally published at Solving Problems with Programming

PICTURE OF ACTOR

So in this eight week class I started with doing the survey of mid semester where I gave ideas in order to improve this course and this and this WSQ07. I started reviewing in creating and calling functions in C++. #Mastery06, #Mastery07, #Mastery16 Use of recursion for repetitive algorithms, #Mastery17 When to use what type of repetition in a program and #Mastery18 Creation and use of Arrays/ Vectors in C++.

What I did for this numeric program is solving the problem to the user by writing 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.Futhermore, Once you have this working, change it so that users keep giving you values until they signal “no more values”. How would you implement this and in particular for the C++ group, how to you deal with an unknown size to your array during compilation?

The quantity of the value depends of the quantity of the type float variable that has only 32 bits of leght, therefore you need a new library in order to increase the value of numbers called Biginteger.hh but I am going to add it in the next WSQ08 called Yo soy 196. Next, to deal with an unknown size of my array during compilation we need to ask the user the number of that size and save it in a variable n.

The resources I need it to solve this program are here:

ken bauer

Similar code made by Eduardo Torres

C Programming Tutorial: Functions (Call By Value, Reference,passing Arrays to function)

The following photograph shows the solution to this problem:

wsq7v2

wsq7v3

wsq7v4wsq7v5

wsq7v6

Picture of author

So at first I wrote the same structure of the program just did the same as

s1
s2
s3
s4
s5
Continue reading "#WSQ07 Lists 03/03/17 and WSQ07.cpp"

Quiz 6

--Originally published at Loading…

I decided to make Quiz 6 before the Activity 7, because it seemed to me would be simpler, also the quiz is for this week. BUT this quiz was too different that the others, it was more time-consuming  and really tested me.

We had to do the first 5 exercises of this page, and they were a little bit different from what normally we do. I did them in disorder, but here they all are.

Activity 1, run a program.

This one was one of the most difficult, and not precisely because it was too hardcore, more like, it wasn’t running correctly through the fault of a parenthesis in the wrong place.

So, the activity was:

Type in the following program and run it:

#include 
main()
{ /* PROGRAM TO PRINT OUT SPACE RESERVED FOR VARIABLES */
	char c;  
	short s;  
	int i;  
	unsigned int ui;  
	unsigned long int ul; 
	float f;
	double d;  
	long double ld;  
	cout << endl 
  	     << "The storage space for each variable type is:"
	     << endl;
	cout << endl << "char: \t\t\t%d bits",sizeof(c)*8;  //  \t means tab 
	cout << endl << "short: \t\t\t%d bits",sizeof(s)*8;
	cout << endl << "int: \t\t\t%d bits",sizeof(i)*8;
	cout << endl << "unsigned int: \t\t%d bits",sizeof(ui)*8;
	cout << endl << "unsigned long int: \t%d bits",sizeof(ul)*8;
	cout << endl << "float: \t\t\t%d bits",sizeof(f)*8;
	cout << endl << "double: \t\t%d bits",sizeof(d)*8;
	cout << endl << "long double: \t\t%d bits",sizeof(ld)*8;

First I completed what it was needing to the program, added the libraries & , wrote using namespace std; (as always), and wrote int before the main. Then I substituted the cout << endl << for printf(. Later, in order to make sizeof( )*8 works Ken said that we need to wrote int( before. And that’s all, this is my code:

quiz6-1

With this activity I learned to use \t for add

quiz6-2
quiz6-3
quiz6-4
quiz6-5
whatsapp-image-2017-02-14-at-10-54-35-pm
whatsapp-image-2017-02-14-at-10-57-10-pm
Continue reading "Quiz 6"

Post of the week #5 what things I learned in this week #5 ? And Index of Mastery Topics

--Originally published at Solving Problems with Programming

Picture of author

First let me tell you that  I learn and achieved all transversal topics and you can see it in the following link: Post of the week #3 what things i learned in this week #3 ? And Index of Mastery Topics

I also explain my project and formed a small team that corresponds of completing this ability to create C++ project in IDE and run inside the IDE and can be explained in my post My Project For the Course TC1017 and Expo Ing

Futhermore, I am going to present the report of all the Mastery Topics achieved in this week:

  1. #Mastery01 Use of comments, achieved in: Post of the week #2 what things i learned in this week #2 ?
  2. #Mastery02 C++ Good Style coding conventions, achieved in: Post of the week #2 what things i learned in this week #2 ?
  3. #Mastery03 Basic types and their use, achieved in: Post of the week #2 what things i learned in this week #2 ?
  4. #Mastery04 Basic output (print), achieved in: Post of the week #2 what things i learned in this week #2 ?
  5. #Mastery05 Basic user input (text based), achieved in: Post of the week #2 what things i learned in this week #2 ?
  6. #Mastery06 Calling functions, achieved in: #Quiz03
  7. #Mastery07 Creating functions, achieved in: #Quiz03
  8. #Mastery08 Importing and using libraries, achieved in: Post of the week #1 what things i learned in this week #1 ?
  9. #Mastery09 Creating and using your own libraries (program with multiple files), achieved in: #Quiz03
  10. #Mastery10 Use of the conditional “if”, achieved in: #WSQ02 Post Temperature 23/01/17 and WSQ02.cpp
  11. #Mastery11 Use of “else” with a conditional if, achieved in: #WSQ02 Post Temperature 23/01/17 and WSQ02.cpp
  12. #Mastery12 Nesting of conditional statements (ifs inside ifs): #WSQ02 Post Temperature 23/01/17 and WSQ02.cpp
  13. #Mastery13 Use of
    recursion
    int-sumsquare
    double-function
    Continue reading "Post of the week #5 what things I learned in this week #5 ? And Index of Mastery Topics"

Post of the week #4 what things I learned in this week #4 ? And Index of Mastery Topics

--Originally published at Solving Problems with Programming

Picture of author

First let me tell you that  I learn and achieved all transversal topics and you can see it in the following link: Post of the week #3 what things i learned in this week #3 ? And Index of Mastery Topics

I also explain my project and formed a small team that corresponds of completing this ability to create C++ project in IDE and run inside the IDE and can be explained in my post My Project For the Course TC1017 and Expo Ing

Futhermore, I am going to present the report of all the Mastery Topics achieved in this week:

  1. #Mastery01 Use of comments, achieved in: Post of the week #2 what things i learned in this week #2 ?
  2. #Mastery02 C++ Good Style coding conventions, achieved in: Post of the week #2 what things i learned in this week #2 ?
  3. #Mastery03 Basic types and their use, achieved in: Post of the week #2 what things i learned in this week #2 ?
  4. #Mastery04 Basic output (print), achieved in: Post of the week #2 what things i learned in this week #2 ?
  5. #Mastery05 Basic user input (text based), achieved in: Post of the week #2 what things i learned in this week #2 ?
  6. #Mastery06 Calling functions, achieved in: #Quiz03
  7. #Mastery07 Creating functions, achieved in: #Quiz03
  8. #Mastery08 Importing and using libraries, achieved in: Post of the week #1 what things i learned in this week #1 ?
  9. #Mastery09 Creating and using your own libraries (program with multiple files), achieved in: #Quiz03
  10. #Mastery10 Use of the conditional “if”, achieved in: #WSQ02 Post Temperature 23/01/17 and WSQ02.cpp
  11. #Mastery11 Use of “else” with a conditional if, achieved in: #WSQ02 Post Temperature 23/01/17 and WSQ02.cpp
  12. #Mastery12 Nesting of conditional statements (ifs inside ifs): #WSQ02 Post Temperature 23/01/17 and WSQ02.cpp
  13. #Mastery13 Use of
    recursion
    int-sumsquare
    double-function
    Continue reading "Post of the week #4 what things I learned in this week #4 ? And Index of Mastery Topics"

Post of the week #3 what things i learned in this week #3 ? And Index of Mastery Topics

--Originally published at Solving Problems with Programming

Picture of author

First let me tell you that in my last post i learn all transversal topics that are:

  • Ability to create C++ file and run from command line (terminal)
  • Create accounts: Blog, Twitter, GitHub
  • Submit work via Blog RSS and GitHub
  • Demonstrate use of Linux sufficient for quizzes/exams
  • Install Linux on their own computer

And you can find it in these posts:

Post of the week #2 what things i learned in this week #2 ?

Post of the week #1 what things i learned in this week #1 ?

I also explain my project and formed a small team that corresponds of completing this ability to create C++ project in IDE and run inside the IDE and can be explained in my post My Project For the Course TC1017 and Expo Ing

Futhermore, I am going to present the report of all the Mastery Topics achieved in this week:

  1. #Mastery01 Use of comments, achieved in: Post of the week #2 what things i learned in this week #2 ?
  2. #Mastery02 C++ Good Style coding conventions, achieved in: Post of the week #2 what things i learned in this week #2 ?
  3. #Mastery03 Basic types and their use, achieved in: Post of the week #2 what things i learned in this week #2 ?
  4. #Mastery04 Basic output (print), achieved in: Post of the week #2 what things i learned in this week #2 ?
  5. #Mastery05 Basic user input (text based), achieved in: Post of the week #2 what things i learned in this week #2 ?
  6. #Mastery06 Calling functions, achieved in: #Quiz03
  7. #Mastery07 Creating functions, achieved in: #Quiz03
  8. #Mastery08 Importing and using libraries, achieved in: Post of the week #1 what things i learned in this week #1 ?
  9. #Mastery09 Creating and using your own libraries (program with multiple files), achieved in: #Quiz03
  10. #Mastery10 Use of
    Continue reading "Post of the week #3 what things i learned in this week #3 ? And Index of Mastery Topics"

Post of the week #2 what things i learned in this week #2 ?

--Originally published at Solving Problems with Programming

Picture of the author.

First let me tell you that in my last week post i learn all transversal topics that are:

  • Ability to create C++ file and run from command line (terminal)
  • Create accounts: Blog, Twitter, GitHub
  • Submit work via Blog RSS and GitHub
  • Demonstrate use of Linux sufficient for quizzes/exams
  • Install Linux on their own computer

And I explained it in my post: Post of the week #1 what things i learned in this week #1 ?

I also explain my project and formed a small team that corresponds of completing this ability to create C++ project in IDE and run inside the IDE and can be explained in my post My Project For the Course TC1017 and Expo Ing

In this week i learned more mastery topics besides of the mastery ones i learnt from last week. I learned these mastery topics:

#Mastery01 #Masterytopic01 #MasteryTopic01 #MASTERY01 #MASTERYTOPIC01 that i talked in my blog: #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp

In this week i learned the #Mastery02 #Masterytopic02 #MasteryTopic02 #MASTERY02 #MASTERYTOPIC02 that is C++ Good Style coding conventions. I achieve this mastery arranging the spaces between the sentences of my code and also by doing plugins for my c++ codes after my teacher give me this feedback:

ken.png

With this link Code »Posting Source Code i used this part of code to use while posting my c++ code in a better way on my last post #WSQ01 Post Fun with Numbers 16/01/17 and WSQ1.cpp . The code i used for it is this:

plugin2

Link of image: Code »Posting Source Code

While you are going to publish your code on C++ in the wordpress editing page you need to copy paste this short code and change the extension of the code, instead of “css” will be the

plugin3
c3
Continue reading "Post of the week #2 what things i learned in this week #2 ?"

Where were we?

--Originally published at prgrm.co

Fun with numbers A.K.A WSQ 01.

Something I didn’t mention in the post before this one, is how the “self-grading” works. For what I understand we need to cover a variety of mastery topics. I’ll go nuts and try tackling as much of them as I can in this post.

Mastery Topic 1: Use of comments.

Well isn’t this one real easy? There are two ways of commenting in c++:

  1. Single-line comments: add // before each line.
  2. Multi-line comments: /* your interesting text here */

Why comment? Well, when doing more complex programs, a comment is always a helpful reminder of what’s doing what.

Mastery Topic 2: C++ Good Style coding conventions

So everyone has a different way to understand and process things, so there is no “actual” way to code, but there are a couple of guidelines that I think is important to follow.

  1. Name your variables in a way that make sense
  2. Watch out for those brackets, you don’t want to loose them or get them mixed up, use your TAB key wisely.

You’ll see what I’m talking about in the code below.

Mastery Topic 3: Basic types and uses

There are different types of variables:captura-de-pantalla-2017-01-24-a-las-12-20-02-p-m

Link for the picture.

Mastery Topic 4: Basic Output.

This one is an easy one as well, you will need this for almost all your programs

  1. Write this at the beginning of your code #include <iostream>, this includes the library in which cout is.
  2. Write this as well include namespace std; this will save you time during your whole project.
  3. Then simply write: cout << ” Your interesting text here “.

Mastery Topic 5: Basic Input.

This is really important but easy as well, it is important because that’s how you’ll ask the user to insert data.

  1. You need to be able to declare your variables prior to
    captura-de-pantalla-2017-01-24-a-las-12-27-20-p-m
    captura-de-pantalla-2017-01-24-a-las-12-31-21-p-m
    Continue reading "Where were we?"