Here´s a link to a quick tutorial on youtube.
#TC1017
#Mastery23
Continue reading ]]>Here´s a link to a quick tutorial on youtube.
#TC1017
#Mastery23
]]>Here´s the link to a youtube video explaining when to use what type of repetition algorithms.
#TC1017
#Mastery22
Continue reading ]]>Here´s the link to a youtube video explaining when to use what type of repetition algorithms.
#TC1017
#Mastery22
]]>Here´s the link to a youtube video explaining how to use nested conditionals.
#TC1017
#Mastery18
Continue reading ]]>Here´s the link to a youtube video explaining how to use nested conditionals.
#TC1017
#Mastery18
]]>Here´s a link to my youtube video explaining how to use a switch conditional.
#Mastery17
#TC1017
Continue reading ]]>Here´s a link to my youtube video explaining how to use a switch conditional.
#Mastery17
#TC1017
]]>Ken wanted us to learn the basics of SciLab, so we use advanced tools that could be useful in our career. It just is.
With time and practice i should be able to use scilab as a very powerful tool in my career.
#TC1017
#WSQ17
Continue reading ]]>
Ken wanted us to learn the basics of SciLab, so we use advanced tools that could be useful in our career. It just is.
With time and practice i should be able to use scilab as a very powerful tool in my career.
#TC1017
#WSQ17
]]>
The semester is ending and our programming #TC1017 C++ course will come to an end; but not before we turn in our final project, which kept us busy for the last couple weeks. Something pretty curious happened to me during this course. I thought challenges were huge until i started getting into them and breaking them into little pieces which didn´t took me long to figure out. After what might have been a couple intense days of thinking and planning, my teammate and I got our sudoku working.
I´ll try to explain, in general terms, how our program works.
Vectors may exist in two dimensions. In this case, our sudoku board is simply a two dimensional vector that is modified by the main function in two sections: WRITE & ERASE. But before writing and erasing we had to check 4 things.
1: You may not modify or erase and original number.
First, we solved this creating a paralel clone vector that was not going to be modified during the game; so everytime the user wanted to erase or to write a new value inside the vector, the program was going to check whether that given position contained or not an original number that belonged to the level. If no original number was found, then the program could continue and write a new value, otherwise, a warning message would print. After talking to ken about a bug, he saw our huge conditonal code creating a huge, 81-slot, vector everytime the Write section was called. He said that our program would run slow and that there was an easier way and more efficient solution to our problem. Negative numbers. The program basically writes every original extracted input as a negative value, but prints the absolute value. So it checks if the value is or not negative. If is, then it is an original number, if not, then... No.
2, 3 & 4: May not repeat a number inside the same cuadrant, on the same row or on the same column:
Columns and Rows were easy to solve. Write a couple nested for loops that walk the conditional (looking for input) through each row or column given and return a boolean if found... The challenge was cuadrants. Since cuadrants were never defined in our vector, we had to create a function that returns the numbered cuadrant the input was located in (1-9), and with this location, a second group of nested for loops would look for a coincidence with the input given. All these where written inside a boolean function that returned TRUE if repeated.
All this development was written after we had checked the input was a number between 1 and 9 and that we read the initial menu input from the user (W for write, E for erase, Q for quit... etc) the last step was writing a function that told the user he had won and aesthetic details.
I´ll include some pictures and the link for the code in gitHub.
Rodrigo and JuanCarlos´s Sudoku Final Project
How the main menu looks like.
You can read how to play sudoku and some history of how sudoku was created.
Here´s the writing interface. The program asks for Row and Column. Notice the new "2".
When you complete a level, the program lets you know right away!
Feel free to download the code and play it in your computer.
#TC1017
cheers.
Continue reading ]]>The semester is ending and our programming #TC1017 C++ course will come to an end; but not before we turn in our final project, which kept us busy for the last couple weeks. Something pretty curious happened to me during this course. I thought challenges were huge until i started getting into them and breaking them into little pieces which didn´t took me long to figure out. After what might have been a couple intense days of thinking and planning, my teammate and I got our sudoku working.
I´ll try to explain, in general terms, how our program works.
Vectors may exist in two dimensions. In this case, our sudoku board is simply a two dimensional vector that is modified by the main function in two sections: WRITE & ERASE. But before writing and erasing we had to check 4 things.
1: You may not modify or erase and original number.
First, we solved this creating a paralel clone vector that was not going to be modified during the game; so everytime the user wanted to erase or to write a new value inside the vector, the program was going to check whether that given position contained or not an original number that belonged to the level. If no original number was found, then the program could continue and write a new value, otherwise, a warning message would print. After talking to ken about a bug, he saw our huge conditonal code creating a huge, 81-slot, vector everytime the Write section was called. He said that our program would run slow and that there was an easier way and more efficient solution to our problem. Negative numbers. The program basically writes every original extracted input as a negative value, but prints the absolute value. So it checks if the value is or not negative. If is, then it is an original number, if not, then… No.
2, 3 & 4: May not repeat a number inside the same cuadrant, on the same row or on the same column:
Columns and Rows were easy to solve. Write a couple nested for loops that walk the conditional (looking for input) through each row or column given and return a boolean if found… The challenge was cuadrants. Since cuadrants were never defined in our vector, we had to create a function that returns the numbered cuadrant the input was located in (1-9), and with this location, a second group of nested for loops would look for a coincidence with the input given. All these where written inside a boolean function that returned TRUE if repeated.
All this development was written after we had checked the input was a number between 1 and 9 and that we read the initial menu input from the user (W for write, E for erase, Q for quit… etc) the last step was writing a function that told the user he had won and aesthetic details.
I´ll include some pictures and the link for the code in gitHub.
Rodrigo and JuanCarlos´s Sudoku Final Project
How the main menu looks like.
You can read how to play sudoku and some history of how sudoku was created.
Here´s the writing interface. The program asks for Row and Column. Notice the new “2”.
When you complete a level, the program lets you know right away!
Feel free to download the code and play it in your computer.
#TC1017
cheers.
]]>This was an interesting WSQ for me because I´m really a car guy.
Thanks to eduardo tostado for orienting me.
link to gitHub: WSQ16
#WSQ16
#TC1017
Continue reading ]]>This was an interesting WSQ for me because I´m really a car guy.
Thanks to eduardo tostado for orienting me.
link to gitHub: WSQ16
#WSQ16
#TC1017
]]>I struggled a little with question 2. I kind of managed to do it but it doesn´t work quite as i wanted it to work.
any way, here´s the link to it.ç
]]>
I struggled a little with question 2. I kind of managed to do it but it doesn´t work quite as i wanted it to work.
any way, here´s the link to it.ç
]]>
For quiz 10 I finally learned how to use vectors. (which i did not do during the rest of the semester.) I had to read a bunch of tutorials, but i just did not understand a thing. At the end, I found a couple videos that helped me through it.
Here´s my gitHub link with my files.
and here are the youtube links.
vectors as parameters in functions
Cheers.
]]>