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 SpellingsFlashcardsDpy 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 FlashcardsFirstCompleteVersion.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 FlashcardsFirstCompleteVersion.py except it shows correctly spelt words and the corresponding misspellings, rather than glossary terms and their definitions.
o iWrite an algorithm for the following section from Box 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 of Block Part 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 of Block Part 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
