Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions