Question 2 You must give a word count for any question part with a maximum word limit. This question tests your understanding of Block 3 Part 2 and, more generally, the problem-solving and Python programming skills that are covered by the module. The question is concerned with a variation of the flashcard problem you studied in Block 3 Part 2. You will find it useful to read through the whole question before starting to answer it. In the original flashcard problem, the cards are designed to help a user improve their familiarity with a glossary of terms. The user can ask the program to show an entry picked randomly from a glossary. When the user presses return, the program shows the definition corresponding to that entry. The user is then given the option of seeing another entry or quitting. Another common use of flashcards is to help someone learning a language practise their vocabulary. Someone learning French, for example, might have a set of cards with English words on one side and their French equivalents on the other. They pick a random card, read one side and then see if they can remember what's on the other side, as illustrated in Figure 1. Figure 1 A flashcard with an English word on one side and its French equivalent on the other. In this question you will adapt a version of the glossary flashcards program to become an English to French vocabulary tester. Box 1 – the problem The program should allow the user to ask for a word list entry. In response, the program should randomly pick an entry from the word list. It should display the English word and invite the user to enter the French equivalent. After the user enters their answer, the program should check the answer. If it is correct the program should tell the user; otherwise, if the answer is wrong the program should tell the user and inform them of the correct answer. The user should be able to repeatedly ask for an entry and also have the option to quit the program instead of seeing another entry. A sample session might run like this: Enter s to show a flashcard and q to quit: s What is the French for red: rouge Correct, well done! Enter s to show a flashcard and q to quit: s What is the French for yellow: vert Sorry, the answer is jaune Enter s to show a flashcard and q to quit: s What is the French for white: blanc Correct, well done! Enter s to show a flashcard and q to quit: s What is the French for yellow: jaune Correct, well done! Enter s to show a flashcard and q to quit: q >>> For the purposes of developing the program we will use a small word list with just six entries: the name of a colour in English, and its French equivalent. Box 2 – keeping a notebook As you work through part a. of this question you should keep a notebook. You will need this for your answer to part a.iv. This should be very brief: it is simply a record of your personal experience while working on the task and what you feel you have learned from it. In your notebook we suggest that you record the following information: How A brief description of how you went about the task. Resources What documentation, if any, you consulted (including course materials and any online sources) and which you found most useful. There is no need for full references, just note the source, and – in the case of the course materials – what the relevant part and section or activity was. Difficulties Anything you found difficult about the task, and how you dealt with it. Lessons learned Anything you learned from the task that would be useful if you faced a similar problem in the future. • a.We have provided a Python file Word_List_Flashcards.py that you should work from when answering this question. If you read this program and run it you will find it is exactly the same as Flashcards_First_Complete_Version.py, except that we have replaced the glossary dictionary and all references to it with a dictionary word_list, which is an English–French word list, and added a comment in the show_flashcard() function. o i.Write an algorithm for the following section in Box 1, reproduced here for convenience. The program should allow the user to ask for a word list entry. In response, the program should randomly pick an entry from the word list. It should display the English word and invite the user to enter the French equivalent. After the user enters their answer, the program should check the answer. If it is correct the program should tell the user, otherwise, if the answer is wrong the program should tell the user and inform them of the correct answer. 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.
Question 2 You must give a word count for any question part with a maximum word limit. This question tests your understanding of Block 3 Part 2 and, more generally, the problem-solving and Python programming skills that are covered by the module. The question is concerned with a variation of the flashcard problem you studied in Block 3 Part 2. You will find it useful to read through the whole question before starting to answer it. In the original flashcard problem, the cards are designed to help a user improve their familiarity with a glossary of terms. The user can ask the program to show an entry picked randomly from a glossary. When the user presses return, the program shows the definition corresponding to that entry. The user is then given the option of seeing another entry or quitting. Another common use of flashcards is to help someone learning a language practise their vocabulary. Someone learning French, for example, might have a set of cards with English words on one side and their French equivalents on the other. They pick a random card, read one side and then see if they can remember what's on the other side, as illustrated in Figure 1. Figure 1 A flashcard with an English word on one side and its French equivalent on the other. In this question you will adapt a version of the glossary flashcards program to become an English to French vocabulary tester. Box 1 – the problem The program should allow the user to ask for a word list entry. In response, the program should randomly pick an entry from the word list. It should display the English word and invite the user to enter the French equivalent. After the user enters their answer, the program should check the answer. If it is correct the program should tell the user; otherwise, if the answer is wrong the program should tell the user and inform them of the correct answer. The user should be able to repeatedly ask for an entry and also have the option to quit the program instead of seeing another entry. A sample session might run like this: Enter s to show a flashcard and q to quit: s What is the French for red: rouge Correct, well done! Enter s to show a flashcard and q to quit: s What is the French for yellow: vert Sorry, the answer is jaune Enter s to show a flashcard and q to quit: s What is the French for white: blanc Correct, well done! Enter s to show a flashcard and q to quit: s What is the French for yellow: jaune Correct, well done! Enter s to show a flashcard and q to quit: q >>> For the purposes of developing the program we will use a small word list with just six entries: the name of a colour in English, and its French equivalent. Box 2 – keeping a notebook As you work through part a. of this question you should keep a notebook. You will need this for your answer to part a.iv. This should be very brief: it is simply a record of your personal experience while working on the task and what you feel you have learned from it. In your notebook we suggest that you record the following information: How A brief description of how you went about the task. Resources What documentation, if any, you consulted (including course materials and any online sources) and which you found most useful. There is no need for full references, just note the source, and – in the case of the course materials – what the relevant part and section or activity was. Difficulties Anything you found difficult about the task, and how you dealt with it. Lessons learned Anything you learned from the task that would be useful if you faced a similar problem in the future. • a.We have provided a Python file Word_List_Flashcards.py that you should work from when answering this question. If you read this program and run it you will find it is exactly the same as Flashcards_First_Complete_Version.py, except that we have replaced the glossary dictionary and all references to it with a dictionary word_list, which is an English–French word list, and added a comment in the show_flashcard() function. o i.Write an algorithm for the following section in Box 1, reproduced here for convenience. The program should allow the user to ask for a word list entry. In response, the program should randomly pick an entry from the word list. It should display the English word and invite the user to enter the French equivalent. After the user enters their answer, the program should check the answer. If it is correct the program should tell the user, otherwise, if the answer is wrong the program should tell the user and inform them of the correct answer. 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.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
100%
Question 2
You must give a word count for any question part with a maximum word limit.
This question tests your understanding of Block 3 Part 2 and, more generally, the problem-solving and Python programming skills that are covered by the module. The question is concerned with a variation of the flashcard problem you studied in Block 3 Part 2.
You will find it useful to read through the whole question before starting to answer it.
In the original flashcard problem, the cards are designed to help a user improve their familiarity with a glossary of terms. The user can ask the program to show an entry picked randomly from a glossary. When the user presses return, the program shows the definition corresponding to that entry. The user is then given the option of seeing another entry or quitting.
Another common use of flashcards is to help someone learning a language practise their vocabulary. Someone learning French, for example, might have a set of cards with English words on one side and their French equivalents on the other. They pick a random card, read one side and then see if they can remember what's on the other side, as illustrated in Figure 1.
Figure 1 A flashcard with an English word on one side and its French equivalent on the other.
In this question you will adapt a version of the glossary flashcards program to become an English to French vocabulary tester.
Box 1 – the problem
The program should allow the user to ask for a word list entry. In response, the program should randomly pick an entry from the word list. It should display the English word and invite the user to enter the French equivalent. After the user enters their answer, the program should check the answer. If it is correct the program should tell the user; otherwise, if the answer is wrong the program should tell the user and inform them of the correct answer.
The user should be able to repeatedly ask for an entry and also have the option to quit the program instead of seeing another entry.
A sample session might run like this:
Enter s to show a flashcard and q to quit: s
What is the French for red: rouge
Correct, well done!
Enter s to show a flashcard and q to quit: s
What is the French for yellow: vert
Sorry, the answer is jaune
Enter s to show a flashcard and q to quit: s
What is the French for white: blanc
Correct, well done!
Enter s to show a flashcard and q to quit: s
What is the French for yellow: jaune
Correct, well done!
Enter s to show a flashcard and q to quit: q
>>>
For the purposes of developing the program we will use a small word list with just six entries: the name of a colour in English, and its French equivalent.
Box 2 – keeping a notebook
As you work through part a. of this question you should keep a notebook. You will need this for your answer to part a.iv. This should be very brief: it is simply a record of your personal experience while working on the task and what you feel you have learned from it.
In your notebook we suggest that you record the following information:
How A brief description of how you went about the task.
Resources What documentation, if any, you consulted (including course materials and any online sources) and which you found most useful. There is no need for full references, just note the source, and – in the case of the course materials – what the relevant part and section or activity was.
Difficulties Anything you found difficult about the task, and how you dealt with it.
Lessons learned Anything you learned from the task that would be useful if you faced a similar problem in the future.
• a.We have provided a Python file Word_List_Flashcards.py that you should work from when answering this question. If you read this program and run it you will find it is exactly the same as Flashcards_First_Complete_Version.py, except that we have replaced the glossary dictionary and all references to it with a dictionary word_list, which is an English–French word list, and added a comment in the show_flashcard() function.
o i.Write an algorithm for the following section in Box 1, reproduced here for convenience.
The program should allow the user to ask for a word list entry. In response, the program should randomly pick an entry from the word list. It should display the English word and invite the user to enter the French equivalent. After the user enters their answer, the program should check the answer. If it is correct the program should tell the user, otherwise, if the answer is wrong the program should tell the user and inform them of the correct answer.
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.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education