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

Warning: Cannot modify header information - headers already sent by (output started at /home/kenbauer/public_kenscourses/tc101fall2015/wp-content/plugins/slickr-flickr/classes/class-plugin.php:152) in /home/kenbauer/public_kenscourses/tc101fall2015/wp-includes/feed-rss2.php on line 8
‘Fall2015’ Articles at TC101 Fall 2015 https://kenscourses.com/tc101fall2015 Introduction to Programming Python and C++ Sun, 22 Nov 2015 05:07:26 +0000 en hourly 1 https://creativecommons.org/licenses/by/4.0/ Quiz 11 https://kenscourses.com/tc101fall2015/2015/quiz-11-18/ Sun, 22 Nov 2015 05:07:26 +0000 http://alansprogramming.wordpress.com/?p=144 Continue reading Quiz 11 ]]> Banana

With great strength come great bananas. “Banana” by Apionid. Link:  https://www.flickr.com/photos/apionid/16138060480/

Question #1:

  • Write a function called calculateE that receives a single float parameter accuracy and calculates the value of e using using sufficient terms ) until the difference between two successive calculations differ by LESS than the parameter accuracy.

Oh boy, this sounds good already!

This was the easier question, no doubt. Checking for help in some websites, such as Stack Overflow and Cplusplus.com everything was clear.

GitHub code Link for Question 1.

Question #2:

  • Write a function called checkBanana that receives a single parameter of type string that is the name of a file in the same directory as the program. The function opens that file of text and counts the number of times that the string “banana” appears. For full marks it should ignore case (so count Banana, BANANA, bAnAnA regardless of mix of upper and lower case characters).
    • To test your program, create your own file to test with in the same directory as your program.

Welp, this was a lot more interesting. Handling files and data is very important in programming, and again, going to Stack Overflow and Cplusplus.com helped, though some of the explanations were far too complicated for my liking, so I turned to Tutorials Point for reference on files and streams.

GitHub code Link for Question 2.

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ10 https://kenscourses.com/tc101fall2015/2015/wsq10-37/ Sat, 31 Oct 2015 21:03:23 +0000 http://alansprogramming.wordpress.com/?p=127 Continue reading WSQ10 ]]> So many items, we might forget something…

WSQ10

vector <string> shopping_list “Shopping list” by Ex-Smith. Link: https://www.flickr.com/photos/ex-smith/3797903995/

Using lists with arrays and vectors is quite easy, but here we need to combine that knowledge with our knowledge of functions and mathematics… oh and C++. Almost missed that one. Doing it with arrays was easy, so I wanted to do it with vectors and asked for help from Montse Bernal, whose code structure I used to make the program work. It was very useful to use the numeric and cmath libraries for this WSQ.

Without further ado, here’s the link for WSQ 10.

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ09 https://kenscourses.com/tc101fall2015/2015/wsq09-36/ Fri, 30 Oct 2015 14:53:57 +0000 http://alansprogramming.wordpress.com/?p=118 Continue reading WSQ09 ]]> You should follow the leader… and multiply yourself times them.

Follow the leader

If she went in, so can I… “Duck Tales” by Thomas Abbs. Link: https://www.flickr.com/photos/tabsinthe/5447936283

Factorials are one of the most fascinating parts of math, but I for one couldn’t wrap my head around how to do a code for this one. Credit to my partner Samantha Rivera for showing me an easy way to do it through recursion. I’ll try and do it with a loop in a future edit.

Enjoy the link! WSQ 9.

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ08 https://kenscourses.com/tc101fall2015/2015/wsq08-35/ Fri, 30 Oct 2015 14:39:58 +0000 http://alansprogramming.wordpress.com/?p=114 Continue reading WSQ08 ]]> Some functions inside one big function…

Functions

Before Inception was cool. “Quadruple Meta!!” by Mark Paschal. Link: https://www.flickr.com/photos/markpasc/3220790292

So we had to repeat WSQ 3 with a little twist. Now all of the operations we did have to be written in functions. This was one of the easiest WSQ’s looking back on it, and still very useful and basic for the understanding of C++.

Here’s the usual GitHub link: WSQ 8.

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ07 https://kenscourses.com/tc101fall2015/2015/wsq07-29/ Fri, 30 Oct 2015 14:14:12 +0000 http://alansprogramming.wordpress.com/?p=111 ]]> Ranges, bounds, formulas!

Ranges

From here to there, you get it. “On The Inside, Lookin’ Out” by Bart. Link: https://www.flickr.com/photos/cayusa/2719066172

Mathematically, there’s a really cool operation we could use to get the integer sum of [n_1, n_2], so when I read that that wasn’t what we had to do (at least not exactly) it felt more interesting.

Here’s the GitHub code link:

WSQ 7.

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ06 https://kenscourses.com/tc101fall2015/2015/wsq06-24/ Fri, 30 Oct 2015 13:32:17 +0000 http://alansprogramming.wordpress.com/?p=108 ]]> Randomness abounds.

Random

So many possibilities… “/the missus and me fart out 10 random SW idiots” by nolnet. Photo used for academic purposes only. Link: https://www.flickr.com/photos/nolnet/4873057384

So for this WSQ, I had to check the <ctime> library and why it worked for assigning random numbers, several times. It ended up being quite easy, as with C++ the same thing can be done in different ways (Thank you cplusplus.com!).

Here’s the GitHub link to WSQ 6.

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ02 https://kenscourses.com/tc101fall2015/2015/wsq02-13/ Wed, 02 Sep 2015 02:45:16 +0000 http://alansprogramming.wordpress.com/?p=21 Continue reading WSQ02 ]]> Holy flippers, Batman!

Students of a flipped classroom.

Original picture by David Stroble. Link: https://www.flickr.com/photos/usnationalarchives/4727537268/

So that’s what a flipped classroom looks like. I had heard the phrase being used before, to refer to a class in which the students watched videos at home and worked in the classroom. However I wasn’t too familiar with the concept, and I must say adjusting to the format is going to take some getting used to.

Having said that, I’m hoping to make the best out of the model and have more freedom to learn by myself. I’m also hoping this will be the case with my classmates, as well.

I’ll leave this video about the topic here. It’s worth checking out!

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ00 https://kenscourses.com/tc101fall2015/2015/wsq00-24/ Mon, 24 Aug 2015 14:34:02 +0000 http://alansprogramming.wordpress.com/?p=3 ]]> Good morning everyone! Agreed to the TC101 Page One document, #WSQ00 is now complete.

https://twitter.com/st_olallaq057/status/630952990740877312

Not the first post of the blog, but the first of the TC101 Course. Excited to post more in the future!

Original picture by Pablo Flores, modifications made for non-commercial purposes only. Link: https://www.flickr.com/photos/pablodavidflores/2929678344

Original picture by Pablo Flores, modifications made for non-commercial purposes only.
Link: https://www.flickr.com/photos/pablodavidflores/2929678344

]]>
https://creativecommons.org/licenses/by/4.0/