Prof. Devadas describes a mind reading trick that allows you to guess the fifth card that the audience thinks of, after you "fail" on the first four! With a competent assistant and a little practice, you'll astonish everyone in attendance.
Puzzle Description
Python Code
Assignment
- Do one or more of the exercises in the You Can Read Minds puzzle.
Solution
Programming Constructs and Algorithmic Paradigms Covered in this Puzzle
- Reading input from a user
- Control flow for case analysis
- Encoding and decoding information