Question: We have provided a Python file Spellings _ Flashcards _ 2 4 D . py that you should work from when answering this question. Please

We have provided a Python file Spellings_Flashcards_24D.py that you should work from when answering this question. Please note that we have not updated the comments to reflect the code changes and one of your tasks will be to do that.
If you read this program, you will find it is essentially the same as Flashcards_First_Complete_Version.py, except that we have replaced the glossary dictionary and all references to it with a dictionary words. The keys in this dictionary are correctly spelt words, and the corresponding values are common misspellings of those words.
If you run it at this point, it behaves much like Flashcards_First_Complete_Version.py except it shows correctly spelt words and the corresponding misspellings, rather than glossary terms and their definitions.
o i.Write an algorithm for the following section from Box 1, reproduced here for convenience.
In response the program should choose an entry at random, and then display the correct and incorrect spellings in random order. It should then invite the user to input either A or B, depending on whether they believe the first or the second spelling is the correct one.
When the user enters a response, the program should check whether the response is right. If so, it should congratulate the user; if not, it should inform them that their choice was wrong.
You will need a way to decide whether the correct or incorrect spelling is displayed first. The method we suggest is to simulate the flipping of a coin, as discussed in Subsection 2.2.2. of Block 3 Part 2. If the simulated coin flip comes up heads, display the correct spelling first and the incorrect spelling second; otherwise, display the incorrect spelling first and the correct spelling second.
Your algorithm should provide a similar level of detail to the show flashcard algorithm in Subsection 2.5.2 of Block 3 Part 2. Your algorithm should resemble the one shown there, except that the user will need to do more than just press return, and the program will have to evaluate the user response and act accordingly.

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 Finance Questions!