The Code Examples for Programming Raspberry Pi: Getting Started with Sketched - third edition. The third edition of the book switched from IDLE to Mu, so you should clone or extract this code into /home/pi/mu_code