--Originally published at Solving Problems with Programming
I am a leader yei!. I am the protagonist in a new world!!
--Originally published at Solving Problems with Programming
I am a leader yei!. I am the protagonist in a new world!!
--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:
--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:
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 Continue reading "#WSQ08 Yo soy 196 11/03/17 and WSQ08.cpp"
--Originally published at Solving Problems with Programming
THIS IS THE #QUIZ9 WHOSE OBJECTIVE IS CREATE AND CALL STRUCK FUNCTIONS TO DO DIFFERENT TASKS AT DIFFERENT TIMES USING RECURSION AND LOOPS. COVERING #MASTERYTOPIC06 #MASTERYTOPIC07 .
In this #QUIZ9 makes a function that receives four parameters: x1, y1, x2, y2 which are all floating point values.
The function is called distance and returns (float) the distance between x1,y1 and x2,y2 on the cartesian coordinate plane. (struct function)
Remember the distance between 2 points:
First let me show you the pictures of the quiz. At the beginning of the quiz we needed it to do this quiz in two ways one using a struct function and the other not. So let me show you the 2 solutions of this problem.
Solution with the struct function:
FIRST TO DO IN THIS #QUIZ09 with the struct solution is including the Library to call all the fuctions of inputs and outputs of data in languague C++ #MasteryTopic01
#include <iostream>//Library to call all the //fuctions of inputs and outputs of data in languague //C++ #MasteryTopic01
Then, we need a library to call all the fuctions of MATH of data in languague
C++ #MasteryTopic01
#include <cmath>//Library to call all the //fuctions of MATH of data in languague //C++ #MasteryTopic01
Next, we need a command that everytime goes with the instructions of input and outputs
of data that is call std but with this command helps writing these std out of the main because the machine factorizes them
using namespace std; //In C++ we need a command // that everytime goes with the instructions of input and outputs //of data that is call std but with this command helps writing //these std out of the main because the machine factorizes them
Then, we need this structure of a function where you have subrutines in order to make
Continue reading "#Quiz09 See the struct function explained!" --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
C++ Tutorial for Beginners 43 – How to Read from a .txt file using C++
The following photograph shows the solution to this problem:
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 Continue reading "#WSQ09 Multipart Data and Files 10/03/17 and WSQ09.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:
Picture of author
So at first I wrote the same structure of the program just did the same as
Continue reading "#WSQ07 Lists 03/03/17 and WSQ07.cpp" --Originally published at Solving Problems with Programming
PICTURE OF AUTOR
THIS IS THE #QUIZ8 WHOSE OBJECTIVE IS CREATE AND CALL FUNCTIONS TO DO DIFFERENT TASKS AT DIFFERENT TIMES USING RECURSION AND LOOPS. COVERING #MASTERYTOPIC06 #MASTERYTOPIC07 . This IS ALSO to fulfill the #Mastery12 Use of recursion for repetitive algorithms
This #QUIZ08 makes first a survey where I gave some advice or feedback to ken bauer in how i am learning in this course. Next, in this quiz 8 makes a function that calculates and returns the “nth” Fibonacci number where we define a function over the Fibonacci numbers mapping the naturals (starting with zero) to the Fibonacci series.
Link of the picture:Link of the picture
So fibonacci(0) returns 0, fibonacci(1) returns 1, fibonacci(2) returns 1 and so on. Note that we are using the modern definition where the sequence starts with zero. I tried to implement this with two solutions: one with a loop and one with recursion. Which do I think is “better”, which looks more “elegant”, which is more “efficient”?
First let me show you the pictures of the quiz:
FIRST TO DO IN THIS #QUIZ08 with the recursion solution is writing a function called ‘fibonacci(int n)’ with an int parameter called n where this parameter is the value of the list in the serie.
Inside of this function, we have a condition a #Mastery10 use of the if statement. This command allows the condition if the value of n is equal to 0 or 1 when this condition will be true, the tasks inside of the statement will execute. In this case if the value of n is equal than 0 or 1 this will occur:
return n; //With this command you return the value of the int variable n in order to show it in THE MAIN FUNCTION
return n; //With this command you return the value of Continue reading "#Quiz08 See the algorithm of Fibonacci serie explained!"
--Originally published at Solving Problems with Programming
So far in this partial I am doing fine but I need to mantain all my hard work constant in order to be great in the next months. Therefore, I can mantain my 100.
In the exam in the first exercise I just needed the command return 0; and in the other exercise it wasn’t neccesary to write the main function.
The following images show the exam:
LET’S CODE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
--Originally published at Solving Problems with Programming
Link of the picture: Link of the picture
So in this seven week class I started with doing the Computing for Social Good!!! and this WSQ06. Therefore, I started reviewing in creating and calling functions in C++. #Mastery06, #Mastery07, #Mastery16 Use of recursion for repetitive algorithms and #Mastery17 When to use what type of repetition in a program
What I did for this numeric program is solving the problem to the user by writing 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).
Moreover, you need to have two basic approaches: a loop with an accumulator of the multiplication and a recursive solution. Choose one and implement that. Once that is done, try the other way.
If you used a while loop for the solution with a loop, try structuring this with a for loop (or vice-versa). Therefore, I am going to show you the 2 solutions in order to accomplish the the masteries regarding recursion. #Mastery16 and #Mastery17
The resources I need it to solve this program with the loop algorithm are here:
Similar code made by Xochitl96
The resources I need it to solve this program with the recursion solution and accomplish #Mastery16 Use of recursion for repetitive algorithms an #Mastery17 When to use what type of repetition in a program are here:
Similar code made by Gonzalomata22
The following photograph shows the solution to this problem:
Picture of author
So at first I wrote the same structure of the program just did the same as what
Continue reading "#WSQ06 Factorial Calculator 12/02/17 and WSQ06.cpp" --Originally published at Solving Problems with Programming
Link of the picture: LINK OF THE PICTURE
Last week I helped this project of computing for social good by doing a first survey based on the presentation that the teacher gave us in the class about how computing can solve real problems that affect every type of community.
4 of the 6 problems I gave in the survey were:
Perhaps, having new apps for each class with games and you are winning points or diamonds in order to exchange those for quizzes or exams or homework or projects and making a decrease of stress among students. Therefore, you will have more healthy students in order to appreciate it more the learning path.
2.In my family community I have the problem that I pay to much for my electricity, so computing can help in developing a software that could increase the power factor near to 1.
In the next part of this project, I will be chating in a video conference with a student from the Grant MacEwan University in order to discuss how computing can benefiate our communities.