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
Omar Peza’s Articles at TC101 Fall 2015, Page 2
Introduction to Programming Python and C++

Author Archives: Omar Peza

Project

After battling with a fatal error (we did google it)

we couldn’t figure out, we asked Ken how we could solve it. Ken found out that we didn’t have a developer library installed (libwebp dev), which was pretty rare. Ken did his magic on the terminal and helped us with the installation of this librarty. After this, we had no more errors and we were finally able to run a test program, and it worked! 

Here’s a proof:

Awesome, right?

Quiz 11

I tried Quiz 11 before doing WSQ14 and I had no idea what to do. After kinda completing WSQ14, the first part of the quiz was easy (assuming what I did on WSQ14 was correct.)

For the second part of the quiz, I did some research and found this webpage, this oneand this other one that had useful information.

Here are my programs: Euler’s Number, Banana.

Kan lahunI have many doubts about this WSQ, and to be completely…

Barely Visible Milky Way

Kan lahun

I have many doubts about this WSQ, and to be completely honest, I don’t even know if I did what was required. Anyway, Euler’s number is complicated.

I found information in this webpage and used it as a guide.

You can check out my code here.

Jason VoorheesThe calculation of square roots with the…

Disneyworld, Orlando

Jason Voorhees

The calculation of square roots with the Babylonian Method is quite interesting and demonstrates the awesomness of math. You can check out how this method works here. 

For this WSQ, I used this webpage as a guide.

And you can check out my code here.

GCD(36,24)= 12 This WSQ was easier than I thought.You can…

GCD(36,24)= 12

This WSQ was easier than I thought.You can check out my code here.

Almost there

This weekend and the next days will be full of programming. I plan to finish WSQs between Saturday and Sunday, Quiz 11 on Saturday, Masteries on Sunday, and final touches to the project between Monday and Tuesday. 

Wish me luck!

Project

After

unnecessarily battling with Windows and Mac for a whole week, we were finally able to install Ubuntu on Mac. We are installing the libraries and making some progress. We’ll update later today after we can compile and run a sample project.

ECOSomething

ECOA and ECOS done! The semester is almost over! 

Project

Ale and I are still trying to figure out how to use the library. In the meantime, we found some webpages that will help us:
http://www.dreamincode.net/forums/topic/76816-image-processing-tutorial/
http://youtu.be/7miwnp8iDm8
http://youtu.be/dtmGlkeImnc…

Mastery 13

On this mastery I will show you what are libraries in C++ and how to use them.

As you may have noticed, the first line of code we’ve been using is always #include <iostream>. This is called a library and they contain commands that you can use in your program. There are more of them, and you can check a list of libraries and their uses here

Library iostream includes the usage of cin and cout in our program, and strictly talking, that’s all we’ve been using for our programs. There’s a library called cmath that includes the usage of more complex mathematical operations. We are going to focus of this library today and use the command for square root, this library will allow us to simply use the command sqrt instead of making all the manual calculations. So, do as follows:

  1. Open the program we made in mastery 24
  2. Add a variable called squareroot.
  3. After the for loop, add the math operation with the new variable and the cmath command: squareroot = sqrt(total)
  4. Print the result.

Your program should look something like this:

Now let’s run it:

Great! Now you know what are libraries and how to use them, congrats!

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).