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
‘#WSQ11’ Articles at TC101 Fall 2015, Page 4
Introduction to Programming Python and C++

Tag Archives: #WSQ11

#WSQ11

Oh no! This one was a struggle that I faced with blood in my hands… Okay not just kiddin’ but honestly this was difficult. At the beginning I didn’t have idea of what I had to do. I search on internet some explanation or samples that could help me to do it. My code: https://github.com/JsphSalazar/WSQ-s/blob/master/WSQ11 […]

#WSQ11

Oh no! This one was a struggle that I faced with blood in my hands… Okay not just kiddin’ but honestly this was difficult. At the beginning I didn’t have idea of what I had to do. I search on internet some explanation or samples that could help me to do it. My code: https://github.com/JsphSalazar/WSQ-s/blob/master/WSQ11 […]

WSQ11 – Yo Soy 196

This WSQ consisted of checking the values from a lower and upper bound, given by the user, and make a report of the based on their palindrome /lychrel/non-lychrel characteristics. To reverse numbers I used extended slices My code can be found here: https://github.com/CarminaP/WSQ/blob/master/WSQ11.py

WSQ11 – Yo Soy 196

This WSQ consisted of checking the values from a lower and upper bound, given by the user, and make a report of the based on their palindrome /lychrel/non-lychrel characteristics. To reverse numbers I used extended slices My code can be found here: https://github.com/CarminaP/WSQ/blob/master/WSQ11.py

WSQ11: A pain in the … feelings

The wsq10 asks me to do a program that recieves only two data from the user: a lower bound and an upper bound. With thopse two parameters I had to tell the user how many palindromes, see for palindromes, are in that range; how many … Continúa leyendo WSQ11: A pain in the … feelings

WSQ11: A pain in the … feelings

The wsq10 asks me to do a program that recieves only two data from the user: a lower bound and an upper bound. With thopse two parameters I had to tell the user how many palindromes, see for palindromes, are in that range; how many … Continúa leyendo WSQ11: A pain in the … feelings

Yo Soy 196 #WSQ11

Hi! This is by far the hardest WSQ I have done. It consisted of creating a Lychrel Number detector but also inform about natural palindromes and Non Lychrel Number. So, to understand this, I guess it’s important to introduce the concept of a Lychrel Number. But to do so, first we have to understand what is a palindrome. A palindrome is a word or number which can be read backwards or normally and says the same, for instance, 12344321 is a palindrome, so is dad. Well, a Lychrel Number is one that does not become palindrome after several iterations of the addition of the reverse. The first known number to be known as Lychrel is 196.

So now that we know what we’re talking about, I’ll talk about the coding process. At first, I had issues sorting all that should be done and how would I do it. But after creating functions and using loops I managed to find the basis of the subject. The first function I created was to reverse the number, I found a nice formula used to reverse a number in this site: //http://www.programiz.com/cpp-programming/examples/reverse-number. Afterwards, I created another function for the Palindrome, which resulted complicated since I had to create another variable so the Palindrome detector wouldn’t output: “I found a Lychrel! It is: 1894789431487384710752”. This was my first issue, solved by a new variable. Also since long long would not hold so many values, I had to implement the BigInteger class, Ken’s video has a nice explanation about it. Finally, I created counters for each type of number, and with ifs I determined how they would be classified.

 

And without further ado, here’s the code:

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

Thanks for watching the code, it was a real challenge.

My reaction throughout this coding:

 

                                                       

Image Source: https://www.reddit.com/r/AdviceAnimals/comments/23ruxk/any_programmer_would_agree_that_this_is_quite_a/

 

WSQ11 – Yo Soy 196

This WSQ has been the hardest one I’ve done, not because of the concepts of programming, but because I couldn’t understand what a Lychrel number was! But finally after a little research and some cooperative work with my friend Luis, finally it worked. Here’s the source code.

WSQ11 – Yo Soy 196

This WSQ has been the hardest one I’ve done, not because of the concepts of programming, but because I couldn’t understand what a Lychrel number was! But finally after a little research and some cooperative work with my friend Luis, finally it worked. Here’s the source code.

WSQ11

This is by far the most difficult WSQ of all, first you need to know how to compile and run with the big integer library, and then you need to know how to use the big integer type and how to convert form string to biginteger and viceversa. You will need a lot of loops, so I hope you know how to use them.

To setup your Big Int library watch this video: https://www.youtube.com/watch?v=PHZYtOhFAZs

if you don´t even know what the program should do, watch this video: https://www.youtube.com/watch?v=KMDDoipS9H0

check my code: https://github.com/MiguelAngelCardenas/WSQ11

GOOD LUCK, YOU´LL NEED IT!!

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