WSQ10…

--Originally published at tc1017 – chivas4ever2009

For this programm we had to create a function to calculate the square of a number using the babylonian method. First, I had to investigate what the heck was the Babylonian Method because I had no clue. It was easy after I found this flowchart that I will post below. Also I included another function that calculated the square root in the traditional way just to verify that the babylonian method was correct.

***Important stuff***

+Functions are everything. Basically this partial was all about functions.

+Remember there are several ways to do the same thing.

+Do your programms by parts.

 

22773381_1987404944806396_2038242645_n (1).png


WSQ09…

--Originally published at tc1017 – chivas4ever2009

This programm was easy for me, I did it during a class. If anyone has a problem doing this programm I can help you. It was about creating a function that used a file, the function had to count the number of lines and characters inside the file. The objective was to learn how to open and read a file. I learned this from a link that Damian my classmate sent to me.

Link:

http://www.cplusplus.com/forum/beginner/11304/

***Imporant stuff***

+The use of strings.

+How to open a file and how to close a file.

2017-10-27 (2)


WSQ07…

--Originally published at tc1017 – chivas4ever2009

Here you can see my programm number 7. It was kinda easy and very useful because it introduces the use and application of lists. The objective was to introduce 10 different numbers into a list, store the values and get the sum, the average and the standard deviation. Ken said we could do it by vectors or by arrays. I chose arrays ,but I did not know how they worked. The first thing I needed to do was learn about the arrays, the other stuff was easy except for the standard deviation. For that I used a basic tutorial of arrays and the formula below.

***Important Stuff***

+You will need to learn how to use different types of variables.

+ Functions are a blessing. They are super useful and practical, and this will be important for future programms.

+Be careful when setting your functions.

+Using the math library.

std.gif

Click to view slideshow.

My Mastery Topics…

--Originally published at tc1017 – chivas4ever2009

Here you can see the topics I used for my programms.

WSQ01…

*Use of comments.

*Basic output (print).

WSQ02…

*Use of the conditional “if”.

*Use of “else” with a conditional if.

WSQ03…

*Use of loops with “while” and “do while”.

*Importing and using libraries.

WSQ04…

*C++ Good Style coding conventions.

*Basic user input (text based).

WSQ05…

*Calling functions.

*Creating functions.

 

 


A bit of help and knowledge…

--Originally published at tc1017 – chivas4ever2009

I am going to share with you the difference between C++ and C. Because honestly I did not knew they were a different thing until last week. I think it it important for everyone to know that. It may also help you to learn more about C++.

PRO.jpg

And here you have a webpage with some cool tips for programming in C++.

http://www.informit.com/articles/article.aspx?p=1712962


Partial 1…

--Originally published at tc1017 – chivas4ever2009

Hello again readers! And by readers I mean Ken! Here I’m going to sahre with you the important stuff I learned through this partial. There are some basic things and some important stuff, hope someone learns something with this post!

+To ‘organize’ and clean my code, with the use of spaces and ‘tab’.

 

+ When you finish a line you must write “endl” WITH L, NOT 1, XX “end1” XX .
+Also I learned how to show the history, just by typing “history” in the terminal.
+Sharing questions at class, because there can be times when other students have the same questions and also everyone can learn something new from the questions.

 

+Be careful with your variables, otherwise the program will take them as general variables and you do not want that.
+ASK FOR HELP. Even to classmates, you can always learn something from everyone.

 

+If you have an appointment with Ken, he will not give you the answer but he will help you understand, and I think that is way better. Thanks again Ken!
+ And last by not least READ THE BOOK.

WSQ 06…

--Originally published at tc1017 – chivas4ever2009

This program seemed to be more difficult, but it was not. It consisted in programming a factorial calculator, the user should introduce any value and the program will provide the factorial of that number. The first thing I had to do was understand what was the mathematical term for ‘factorial’. Then I searched in google for tutorials, I found two different forms of doing it, but I was confused and didn’t understand at all. Then Ken explained that specific program in class because some of us were having problems. So with that and with the research I had done, I could develop my code and it worked.

**IMPORTANT STUFF**
+Sharing questions at class, because there can be times when other students have the same questions and also everyone can learn something new from the questions.

Links of my research:

http://es.ccm.net/forum/affich-1284727-sacar-el-factorial-de-un-numero-con-c

https://www3.ntu.edu.sg/home/ehchua/programming/howto/EclipseCpp_HowTo.html

2017-09-15 (3)


WSQ 05…

--Originally published at tc1017 – chivas4ever2009

On to functions…
Here you can see my fifth program, at first I thought it was going to be super easy because it was just about getting the sum, subtraction, product, division and remainder from two integers, through functions. When I first tried to compile it, the bash terminal marked me a lot of errors. Honestly I was annoyed, I couldn’t find my mistake. So I decided to ask for help to my classmates, shoutout to Cristo. Thanks bro, he helped with the code and he did found my mistake. It was something about the variables. After Cristo’s help I realized that it was easy because since the beginning I was kinda using functions inside of my programs. But I wasn’t calling the functions in the previous programs. The program worked and it was all set, thanks again to my friend Cristo!

**IMPORTANT STUFF**
+Be careful with your variables, otherwise the program will take them as general variables and you do not want that.
+ASK FOR HELP. Even to classmates, you can always learn something from everyone.

 

2017-09-15 (1)

2017-09-15 (2)

 

 


WSQ 04…

--Originally published at tc1017 – chivas4ever2009

Here you can see my 4th programm. It had to ask for a range of numbers (integers) and then print the sum of that range of numbers, including the first and the last one. Basically it was a summation from the two values that were asked to the user. I knew what I had to do, but I wasn’t sure on how to include a summation in my programm, so I decided to ask Ken. I did an appointment and he helped me. I realized that it was very simple, I just had to put a ‘while’ condition that added one (+1)  to the first value until that value reached the second and at the same time added the value that were given by the first condition. (1+2+3….).

 

***IMPORTANT STUFF***

+If you have an appointment with Ken, he will not give you the answer but he will help you understand, and I think that is way better. Thanks again Ken!

2017-09-15

#WSQ04 #TC1017

 


WSQ 03…

--Originally published at tc1017 – chivas4ever2009

Here you can see my third programm, I found it to be a little bit more complicated since it uses different libraries, and other commands. It also uses a counter and a generator of random numbers. I found a great website that has a lot of useful stuff for promming in C++, it is nice and easy to understand, I liked it more than lynda.com honestly.

Here is the link: http://www.cplusplus.com/

***Important stuff I learned***

+How to use the command do.

+The name of 2 new libraries and how they work.

+The use of a counter.

+Hot generate random numbers.

2017-08-25

#WSQ03