Puzzler : 20,000 Lights

From Car Talk. RAY: This puzzler is from my “ceiling light” series. Imagine, if you will, that you have a long, long corridor that stretches out as far as the eye can see. In that corridor, attached to the ceiling are lights that are operated with a pull cord. There are gazillions of them, as far […]

Obfusticated Mandelbrot Set

Coolest thing I’ve seen in a while: High Resolution Mandelbrot code in Python. The following Python script, on the other hand, begins as ASCII art: It renders the Mandelbrot set as a full-color, anti-aliased, 1500×1000 image. Fantastic. Notice that the code also looks likes the mandelbrot set. A true accomplishment with python being so fussy […]

Python Challenge

  Python Challenge is a “programming riddle” on the internet. What is the Python Challenge? The Python Challenge is a set of riddles that require a little bit of Python programming to be solved. The solutions are entered by changing the address of the page (URL). You get used to the idea pretty fast after […]

Changes to Intro to Computer Programming

This will be my third year teaching Introduction to Computer Programming. The first year I had 15 students which was a good showing, but last year I only had 5 students. It turned out to be a scheduling issue, but I was still worried about the health of the course, and whether or not it […]

Dartboard Problem

From Infinigons, etc: Putting myself in kids’ shoes You have a square dartboard. What is the probability that a randomly-thrown dart will land closer to the center of the dartboard than to an edge? Superb problem. I took the lazy route. I made a python program to run 100,000 trials, and graph those trials on a […]