# Making flash cards with Mathematica

I've been trying to make flash cards to help me memorize some concepts in my technical classes this semester. Since Mathematica's (mathematical) type setting is so superb, I attempted to make flash cards with it.

Some of my attempts:

1) Add group openers to input cells: Go to Format > Edit Stylesheet. Then, if your input cell style isn't already in the stylesheet, click on the 'Choose a style' drop down menu and choose Input. Then, with the Input cell style highlighted, press Ctrl+Shift+E, and append ShowGroupOpener->True to the end of the cell editor. For example, your Input cell might look like this:

After that, press Ctrl+Shift+E again to close the cell editor, and close the stylesheet editor. Your "flash card" should now behave like this:

2) Use Button: For flash cards whose questions are a combination of words and formulas, I use Button (I also chose Grid for its robust customization):

Clear[show]
SetAttributes[show, HoldAll];
show[string_String, expression_] :=
Grid@{
{string,
};

show["Calculate", Integrate[1/(x^3 + 1), x]]


One problem with this method is that if you hide the input cells (so that only the output cells containing the buttons are shown in the notebook) using this method, these flash cards behave weirdly: pressing the button again might reveal the input cell, or in subsequent pressing of the buttons, it will print out an answer that is hidden within a cell grouping (try evaluating the above example and pressing the button several times and you'll see). This is probably caused by the groupings of the print cells. Another issue is getting rid of these cells (or hide them), which I can't figure out how to do right now.

This question is supposed to encourage everyone to show your implementations of flash cards in MMA (or improving on my methods), especially ones that have helped you study in the past. Please feel free to post whatever you'd like: small self-contained flash cards, helper functions/manipulates to display flash cards based on users' input, or systematic ways to smartly organize flash cards. Let your creativity fly!

Other ideas might include: asking users to input an answer and returning True or False if the answer is right or wrong, randomizing the display of flash cards, and delaying a flash card if the user answers/guesses correctly on it. Anki is a good reference for good examples of flash card implementation.

• Although interesting, I'm not really sure whether this question fits the format and scope of this site – Dr. belisarius Aug 29 '14 at 4:28
• Several interfaces are discussed in tutorial/Views. [BTW, that integral seems particularly un-flash-card-worthy. :) ] – Michael E2 Aug 29 '14 at 10:32
• @MichaelE2 best comment I've seen in this SE. Thank you! I just lifted the integral straight from the documentation just to show off the traditional form; I probably should have picked a better example. – seismatica Aug 30 '14 at 4:21

Why not take advantage of the fantastic on-board tool "Slide Show"?

Edit

I'm using "10.0 for Mac OS X x86 (64-bit) (June 29, 2014)"

Slide Show has two Modes. Edit and Presentation. On Menue>Palettes you'll find the Palette

Slide Show

Just use this Palette to Start, Stop, Create ... Setttings. The Screenshot shows a Slide Show file in some (?) kind of Edit Modus.

Edit

I've been thinking about your idea and tried another way to work out.

The basic idea is to provide all the Q & A as variables in a cell, and to bring up the questions with q1 ... qn and retrieve the answers with a1 ... an.

The whole thing certainly needs much revision, but I guess you understand the concept. Below the Q & A part. Have fun!

q1 = Text["What is the sum of 1+1?"];
q2 = Text["Sketch sin(x)"];
q3 = Text["Expand (1+x)^3"];
q4 = Text["What is the name of this \[Pi] character?"];
q5 = Text["What is the value of \[Pi] to the 20th digit?"];
q6 = Text["What is the formula for kinetic energy?"];
q7 = Text["Make a Table of the first 10 Squares."];
a1 = 1 + 1;
a2 = Plot[Sin[x], {x, -\[Pi], \[Pi]}];
a3 = Expand[Expand[(1 + x)^3]];
a4 = Text["\[Pi] is Pi"];
a5 = N[Pi, 20];