Warning: The magic method Slickr_Flickr_Plugin::__wakeup() must have public visibility in /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php on line 152
Carlos Gallegos’s Articles at TC101 Fall 2015
Introduction to Programming Python and C++

Author Archives: Carlos Gallegos

Final Project Entry 5 #Project

After a whole day of failed attemps, we couldn’t crop the image to half its size. It resulted more complicated than expected because the program did not recognize arrays of Colors, we could only use vectors and it turned difficult solving it p…

Review of the semester #BONUS

This might be my last blog post for the semester, so I have to say it was cool. Here’s the video with the full reflexion:http://youtu.be/IUpH-R9ch4A?hd=1#BONUS #TC1017

Types of repetition #Mastery22

This mastery is related to the different types of repetition and in which cases they are recommended.

In this video I talk about while, do while, for and recursion: http://youtu.be/n1aKtTZ4Smg?hd=1

Also, I uploaded a video for the for loop, here’s a link to the blog post: https://interestingstuff.withknown.com/2015/loops-20-mastery20-mastery21

Interaction with Files #Mastery28

This Mastery consisted of writing and extracting information from files.Here’s my video explaining the concept:http://youtu.be/CIMHpCOYHKs?hd=1#Mastery28 #TC1017

Strings #Mastery25

This concept refers to the creation an use of strings in C++´.

Here’s my video explaining the concept: http://youtu.be/T4ig0fGOyOY?hd=1

Use of recursion #Mastery 21

This concepts refers to functions calling themselves to archive a task.

Here’s the video: http://youtu.be/bh6ot1Hr5_c?hd=1

Scilab #WSQ17

This is the last WSQ of the semester, and it consisted on using scilab and reporting the experience. I found the tool very useful since it can execute several commands and also it functions as a text editor. I also found pretty interesting the fact that it allows you to interact with matrices, differential equatings and 3D graphs, which, I believe, is going to be useful during the following semesters of my career. Also the palette browser has many interesting features which I will research later when I require and understand them. Thanks for reading! 

 

Final Project Entry 4 #Project

Hello, yesterday we worked for several hours to obtain a functional code that could turn the image from colors to black and white. We archived it by obtaining the color from each individual pixel, adding them to a vector of colors and turning the colors to black and white. Afterwards, we added them to the image by using a for. Here’s the resulting image:

                   

Cars #WSQ16

Hi! This WSQ was difficult an required a lot of research and failures. It consisted on opening a file, substracting some information and report it to the user. Opening the file was simple, with the use of a ifstream similar to the quiz. After turning it to a string I had issues when I attempted to turn the values in the strings to floats, the first solution I found was: http://www.cplusplus.com/reference/string/stof/. But when it did not compile, I did some research on internet and found a forum in which they mentioned that it wasn’t included in the compiler I used but there was another solution. They included this link: http://www.cplusplus.com/articles/D9j2Nwbp/#s2n, which turned to be very useful and allowed me to finish the WSQ.

Here’s the code: https://github.com/CarlosGallegosT/Codes007/blob/master/Cars.cpp

Thanks!

               

Bananas, bananas and e #Quiz11

Hello, this quiz consisted on fulfilling two assignments: calculate the value of e with a given accuracy and open a file and search for the word banana and count them even if they are written in capital letters. The first question was a little tricky since I didn’t actually understand if it should calculate until the given accuracy and then output the value with certain decimals or just do the calculation, so I just set the precision to the number of repetitions required to get to the number. Here’s the code for that problem:

https://github.com/CarlosGallegosT/Codes007/blob/master/Q1.cpp

The last one was a bit more complicated, I had to do some research to understand how to open a file and then turn all of the information into something easier to interact with. Then I found this page: http://stackoverflow.com/questions/7868936/read-file-line-byline. Afterwards, I turned all of the string into lower case letters so when I searche for bananas it would also consider the ones with capital letters. I didn´t understood why it did not work when I hit the Enter button within the file, I guess I will ask about it in class. Anyway, here’s the code:

https://github.com/CarlosGallegosT/Codes007/blob/master/Q2.cpp

Thanks!

 

What should you work on?

Week #12 and more partial exams for you.

For this week's readings:
C++ (TC1017) should either be looking at support for your project, ImageMagick C++ libraries are a good start.
Python (TC1014) should be finishing chapter 11 (Dictionaries).