Category Archives: Python

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-5971bfbba9af8493660774-i/] is equivalent to [crayon-5971bfbba9b01357579640-i/] [crayon-5971bfbba9b06078467758-i/] is equivalent to [crayon-5971bfbba9b0b231362841-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-5971bfbbac8ed591568978-i/]  or [crayon-5971bfbbac8f5613515555-i/] , but python contracts that to the single word [crayon-5971bfbbac8fa359888863-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...

Pygame Add Image to Surface

So, you know how to make a simply pygame window, and now you want to do something a bit more interesting, aye? How do you  add an image to your pygame surface ? In this quick tutorial, we’ll show you exactly that. So that your finished product will look like is the following picture :     … Continue reading Pygame Add Image to Surface →