Tag Archives: examples

What is DeMorgan’s Law in Programming? [ Answered with pics]

Demorgan’s Law is something that any student of programming eventually needs to deal with. Just tell me the “formula”, ok : [crayon-5a12d7dff3f59225183572-i/] is equivalent to [crayon-5a12d7dff3f62539285525-i/] [crayon-5a12d7dff3f68369043157-i/] is equivalent to [crayon-5a12d7dff3f6c822117894-i/] Demorgan’s Law via Animation and Code 2 animations of Penjee Python code demonstrating DeMorgan’s law The goal of the map below is to write a while loop until … ...

What’s an elif in Python? [Answered with vids and gifs]

In short,  an “elif”  means “else  if”.. If you’ve used other programming languages, you’re probalby used to writing [crayon-5a12d7e002c05993707263-i/]  or [crayon-5a12d7e002c0e033814648-i/] , but python contracts that to the single word [crayon-5a12d7e002c13564134860-i/]  .   The video below, from our middle school cu rriculum for teaching kids python, explains how to use an elif     If  you’re not a video … Continue read...

What is a Logic Error ?

A logic error always does the following It allows the program to run (or at least to start). It leads to unexpected results . The program might seem to work fine 99% of the time, but during that other 1% of the time, something weird occurs. Example of a Logic Error in Penjee: As you can see from the above animation, we … Continue reading What is a Logic Error ? →