“easy” A

October 30, 2019

first, it was the Towers of Hanoi.  And then it was QuickSort.  i wanted to provide “simpler” explanations of concepts i was taught during my undergraduate days.   i eventually got them (with some effort) but they are trickier to “share” with others.  But like most technologists, i’ve substantially underestimated the the time and effort in realising these. i guess i was severely swayed by my experience in “simplifying” the normal forms when i taught databases.

i think i need to take a cue from the much greater individuals that preceded me. Or just use great ideas from others and properly attribute their work.  in any case, i should reacquaint myself with these concepts and refresh my memory – so that my unconscious mind can continue to work on these while i focus on something else.  hopefully, it will no be long between “Eureka” moments.

i have just got back from medical leave “recently” and have been “out of commission” for the last few days due to a procedure (it should have taken only two days to recuperate but due to my age it took me longer to recover – i’m still not 100%).  Lately, i’ve been “scrambling” to salvage any hope of completing my research degree.

kindly excuse my “radio silence” for the last few (and probably next few) days.

 

prime (directive)

October 21, 2019

i moved to a function that determines if a number is prime – i’m still struggling with how to make the Tower of Hanoi problem “simpler” (as Einstein puts it) to understand.  i always knew that “0” was not prime but now i know why not.  i was taught in school that “1” was prime but apparently not according to the definition.

Here’s the updated GitHub repository:

https://github.com/LinsAbadia/Python/tree/master/Problems/Exercises

tower of Babel

October 17, 2019

for the last few days, i’ve been held up by the “Tower of Hanoi” problem.  at first it was just a debugging issue and getting the code to work as expected; however i realised the real difficulty was in being able to explain the algorithm “simpler” and in “plain English” – i’m still thinking about  how to do this.

the interchange

October 13, 2019

i talked about simple swapping and how this was supported in Python.  it was also an opportunity for me to discuss object introspection (through the “?” operator), the type function, variable references by assignment, and the copy method.

Here’s my updated GitHub repository:

https://github.com/LinsAbadia/Python/tree/master/Problems/Exercises

 

 

toy story

October 11, 2019

“Toy Problems” are puzzles or illustrative devices.  they can be useful in discussing features supported by programming languages. it’s a bit of “mental gymnastics” or what can be oxymoronically  referred to as “recreational math”.

i started with something simple called a palindrome:  a word spelled the same backwards as forwards.  However, i extended it to detect “palindromic” strings instead: that is, it should also check multiple words, phrases, or sentences (that exclude a period or full stop).

Here’s the updated GitHub repository:

https://github.com/LinsAbadia/Python/tree/master/Problems/Toy

i introduced user-defined function with def.  i discussed return values, default parameters, functions as arguments, and recursion.  i left out variable scoping and; pass by value vs. pass by reference as i wasn’t sure what to include. my treatment  was, partly, influenced from what i remember being taught about computing from long ago days of uni (i.e undergrad and postgrad) in the Philippines.

here’s the updated GitHub repository:

https://github.com/LinsAbadia/Python/tree/master/FlowControl