Question: design an algorithm for the following problem The user can ask to see a random flashcard They are then shown a glossary entry, together with

design an algorithm for the following problem

The user can ask to see a random flashcard

They are then shown a glossary entry, together with a definition that is not necessarily correct, and asked to say if the definition is correct or not. They are then told whether their response was right or wrong.

The user can repeatedly choose to either see a random entry, as described above, or choose an option to quit the program

A sample dialogue might run as follows:

Enter s to show a flashcard and q to quit: s

Here is a glossary entry:

word3

Here is a possible definition for it:

definition1

Is the definition correct? Enter Y or N: Y

Your answer was wrong

Enter s to show a flashcard and q to quit: s

Here is a glossary entry:

word2

Here is a possible definition for it:

definition2

Is the definition correct? Enter Y or N: Y

Your answer was right

Enter s to show a flashcard and q to quit: s

Here is a glossary entry:

word3

Here is a possible definition for it:

definition1

Is the definition correct? Enter Y or N: N

Your answer was right

Enter s to show a flashcard and q to quit: s

Here is a glossary entry:

word1

Here is a possible definition for it:

definition1

Is the definition correct? Enter Y or N: N

Your answer was wrong

Enter s to show a flashcard and q to quit: q

the below is the start of the algorithm

>> Show flashcard

Choose a random glossary key

Choose another random glossary key

Decide randomly whether to display the correct or incorrect definition

Display the random glossary key

Display either the correct or incorrect definition, as appropriate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!