O'Reilly logo

Accidental Genius, 2nd Edition by Mark Levy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12Using Assumptions to Get Unstuck

A few years back, my wife asked for help in designing a magic trick. Now, asking me to design a trick isn’t such an odd request, given that I’ve been interested in magic for forty years and have written books on the subject. This request, though, had a catch.

My wife needed the trick, not for entertainment purposes, but for use in a computer course. It seems she was learning an advanced computer language, and her professor gave the class an assignment that sounded a lot like a mind-reading stunt.

The assignment went like this: Design a program that reveals, in ten guesses or less, a number from 1 to 99, secretly chosen by the computer.

I grabbed a pad and pen, and went to work.

“Tell the computer to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required