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
‘Easy Peasy Lemon Squeezy’ Articles at TC101 Fall 2015 https://kenscourses.com/tc101fall2015 Introduction to Programming Python and C++ Thu, 26 Nov 2015 01:22:42 +0000 en hourly 1 https://creativecommons.org/licenses/by/4.0/ WSQ11 https://kenscourses.com/tc101fall2015/2015/wsq11-24/ Thu, 26 Nov 2015 01:22:42 +0000 http://5nbppkkyj.wordpress.com/?p=138 ]]> In this WSQ I asked the user for a lower and an upper bound, then I It was challenging but I found that researching and understanding the concept completely was crucial.

https://github.com/DianaJU/Write/blob/master/lychrel.py

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ10 https://kenscourses.com/tc101fall2015/2015/wsq10-29/ Thu, 29 Oct 2015 01:27:26 +0000 http://5nbppkkyj.wordpress.com/?p=127 ]]> This was kind of hard to do the right way. I tried to ask the user for numbers separately and then do calculations with all of these as variables before realising it was kind of wrong so I read the List chapter and understood how to use loops for it. In this way, my code is based off the book and Carmina’s code since it is so good an easy to understand.

Screen Shot 2015-10-28 at 7.15.40 PM

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ09 https://kenscourses.com/tc101fall2015/2015/wsq09-32/ Thu, 29 Oct 2015 01:27:23 +0000 http://5nbppkkyj.wordpress.com/?p=122 ]]> So this is simple factorial calculator, it was kind of easy to do.
Screen Shot 2015-10-28 at 5.55.54 PM

This is factorialcalc.py in action!Screen Shot 2015-10-28 at 5.55.10 PM

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ08 https://kenscourses.com/tc101fall2015/2015/wsq08-32/ Thu, 29 Oct 2015 01:27:21 +0000 http://5nbppkkyj.wordpress.com/?p=105 ]]> In this WSQ I have fun with numbers, again!

I’m sure my code can be optimized but I tried to write it as clean i.e. readable, as possible. So yeah, all I did was print some options for the user and ask for two numbers to work with. Finally, I created some functions so they are called according to the user’s needs.

Screen Shot 2015-10-15 at 7.24.49 PM

This is ontofunctions.py in action!Screen Shot 2015-10-15 at 7.27.30 PM

]]>
https://creativecommons.org/licenses/by/4.0/
Mastery03 https://kenscourses.com/tc101fall2015/2015/mastery03-2/ Fri, 18 Sep 2015 20:33:39 +0000 http://5nbppkkyj.wordpress.com/?p=103

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ07 https://kenscourses.com/tc101fall2015/2015/wsq07-18/ Fri, 18 Sep 2015 19:34:22 +0000 http://5nbppkkyj.wordpress.com/?p=96 This was challenging but surprisingly fun. I had some problems that were solved understanding what I was doing so the book helped me a lot.

This is my code:

Screen Shot 2015-09-18 at 2.20.32 PM

This is Sumofnumbers.py in action:

Screen Shot 2015-09-18 at 2.22.31 PM

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ06 https://kenscourses.com/tc101fall2015/2015/wsq06-9/ Sat, 12 Sep 2015 22:46:23 +0000 http://5nbppkkyj.wordpress.com/?p=70 ]]> This WSQ06 was quite easy, I just had to find a way in which I could get a random number so I used the function random.randint(a,b).

What my program does

It sets a random number between 1 and 100 and then asks the user to guess that number. I wrote it in a way that the user has 5 chances to get it right. I did this by setting a variable which counts how many times they get it wrong and each time it tells them if their guess its low or high. If they get it right, the program tells them the number of attempts it took them to guess.Screen Shot 2015-09-10 at 7.55.27 PM

randominteger.py in action:

Screen Shot 2015-09-12 at 4.01.06 PM

This is what happens when you guess the random number.

Screen Shot 2015-09-10 at 7.55.42 PM

This is what happens when you don’t.

]]>
https://creativecommons.org/licenses/by/4.0/
WSQ05 https://kenscourses.com/tc101fall2015/2015/wsq05-5/ Wed, 02 Sep 2015 01:20:28 +0000 http://5nbppkkyj.wordpress.com/?p=61 ]]> This was quite easy since it was similar to the Fun with Numbers WSQ.

In this WSQ I ask the user to choose a temperature measurement unit to convert their Fahrenheit degrees to.

Once they chose it I inserted their integer input into its respective formula.

I printed the conversion result and used if and elif to state whether their water is boiling or not.

wsq05

WSQ05.py in action.

wsq05proof

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