1.1-Introductie-Programmeren

Memory trainer

Difficulty: Filled Filled Filled

For a time, a favorite game on Dutch television show included a game that asked a contestants to “memorize” items that he saw and then needed to recite that list. Today we’ll create our own version of this game that actually might also serve a program that helps you train your memory.

Create a program that reads all groceries from the provided csv file and selects 10 of those to be used in the game (at random). The game itself actually consists of two phases: First you get a few seconds (e.g. 10) to study the list and remember as many items as you can.

Next, you are prompted to enter the groceries that you remembered one line at a time. For each line, the computer will show you (using a red or green color) whether or not the grocery was on the initial list. At any time the user can “give up” by hitting enter on an empty line.

At the end of the program, the user is shown the number of correct entries (which will be shown as a score) and the remaining items of the list that were missed.

Some hints to get you going:

Example

example

example