When you say something is a "piece of cake," it means it is very easy to do.
In the 19th and early 20th centuries, African Americans started "cake walks." They walked or danced around a cake in pairs, and the best couple won the cake. This is how the idioms "cake walk" and "piece of cake" came about -- both meaning that something is very easy to do.
A: Hey! How did you do on the exam?
B: I got an A. The exam was a piece of cake.
When you have to pee in a movie but don’t want to miss anything, and must do the following mental equation: will the amount I have to pee cause enough discomfort to diminish my attention capacity for the remainder of the movie to an extent which is greater than the amount of the movie I would miss by making a mad dash to the restroom.
I saw Satantango last night, wonderful film but by the 5th hour I had to start doing pee calculus.