<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>SOLVING IT?</title><description>SolvingIt explores programming concepts and innovations in technology that solve human problems.</description><managingEditor>noreply@blogger.com (Emekadavid)</managingEditor><pubDate>Fri, 1 Nov 2024 10:07:55 +0100</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">282</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">3</openSearch:itemsPerPage><link>http://emekadavid-solvingit.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>SolvingIt explores programming concepts and innovations in technology that solve human problems.</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>Leveraging the Power of Loops with Loop Invariants.</title><link>http://emekadavid-solvingit.blogspot.com/2020/09/leveraging-power-of-loops-with-loop.html</link><category>abstraction</category><category>coding</category><category>python programming</category><author>noreply@blogger.com (Emekadavid)</author><pubDate>Mon, 21 Sep 2020 15:00:00 +0100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5022641238027681605.post-5701384560443181020</guid><description>Have you gotten into a situation where it was hard to keep track of what is wrong with your loop because the loop either runs forever without terminating or it gives results that were not expected? One way to leverage on your loops and show that your loops correctly give the desired result is to prove your loops with loop invariants.

&amp;nbsp;
What is a loop invariant
A loop invariant is a proof </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLFn4qGHzhY5vEMHzJZ9OCmqAQkXBC19gSRWQGNt0er6QyZVszYTPhyKo4qcehyphenhyphenEGNPWpxp0t2Krst5ysZTMijUIlM1KqZ6BMSOV54_IRXUztYMjoQF9XwMmPSvnlFzQmJC5flaHkHFBA/s72-w380-h213-c/loops.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Check If Python List Contains Unique Elements Or Items</title><link>http://emekadavid-solvingit.blogspot.com/2020/09/check-if-python-list-contains-unique.html</link><category>abstraction</category><category>coding</category><category>python programming</category><author>noreply@blogger.com (Emekadavid)</author><pubDate>Sat, 19 Sep 2020 15:55:00 +0100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5022641238027681605.post-4843737697215854601</guid><description>While going through a Reddit group post on python recently, I saw a question that was similar to the element uniqueness problem and the way the answer was formulated struck me as odd. I thought the implementation was not optimal or efficient, so I volunteered an answer that I knew was better. 

&amp;nbsp;
The question was: how do I check to see if my python list contains elements or items that are </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO8j2YkbHLIZwarMIJ1Tx4LSelSc0pG3LtORd0XxQ-xWsjqRX9qgeBvR501pYldKeEMKwXZMuJOxJ_pv2dyrkSV8xZaZIxYbOMlYdxoFBkEyY0QgnfvgRF9L81bSHxVUa5ZuPgQjL7HVQ/s72-w392-h210-c/unique.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Emulating Lists In Your Python Classes With MutableSequence</title><link>http://emekadavid-solvingit.blogspot.com/2020/09/emulating-lists-in-your-python-classes.html</link><category>abstraction</category><category>coding</category><category>python programming</category><author>noreply@blogger.com (Emekadavid)</author><pubDate>Thu, 17 Sep 2020 14:27:00 +0100</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-5022641238027681605.post-6947322162909633238</guid><description>Python provides for ways we can emulate the native data structures in our own defined classes. In this post, I will show you one way you can emulate a list. A list is a mutable sequence that has items which are ordered by index. 

&amp;nbsp;
In my post on operator overloading and dunder methods, I showed you a way a class can behave like a list. But we can extend that concept a little further by </description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjynHaMzFNmqutV9rX_XGy3Sztp0hnvV1pmj82PtydShkzISoJZpFhxUCjAcIKaoZL9OTGMTO7jYAlNlNY42vgoEPe00BEjxk4lH1SxTHuWT5wGJxIOfLGct_LjozgVAQ1gPS8yqLH6wOs/s72-w373-h160-c/mutablesequence.jpg" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item></channel></rss>