subject

The goal of this assignment is for you to become more proficient with file i/o, using functions, and learning to use the dictionary data structure effectively. dictionaries are very useful data structures when you can map something (e. g. an english word), to something else (e. g equivalent spanish words). for this assignment, you will synthesize these concepts together by creating an english-spanish vocabulary program if you've ever taken a foreign language class, you may have studied for tests by creating flash cards to memorize how a given word in a particular language translates into a different language for this project, you are to create a vocabulary quiz program that requests the name of a vocabulary file in the current directory, quizzes the user on a subset of the words in the vocabulary file, and then gives the user the option to write out any missed words to a new vocabulary file. while the word lists that we are using are english to spanish, the program could easily be applied more generally to other languages, giving you a practical replacement to flash cards! program outline 1. check if there are any vocabulary files in the directory, which by convention are files that end in .txt. print the list of files found. if there aren't files ending in .txt, display an error message and quit. 2. have the user select which vocabulary file he or she would like to use. error check to make sure that they select a valid file (i. e., one of the files listed in step 1). they may also choose q to exit the program 3. store the contents of the vocabulary file into a dictionary data structure. 4. prompt the user for the number of words he or she would like to be quizzed on. error check to make sure the number is valid. equal to 10 it has to be greater than o and less than or 5. quiz the user by using a randomly generated list of english words from the dictionary 6. if the user misses guesses incorrectly, then output the correct words 7. if the user guesses correct, output that they were correct, if there was more than one

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 17:50, ImBADatmath8743
Farah works in an office with two other employees. all three share a printer and an internet connection. the utility that makes this possible is defragger quicktime soho winzip
Answers: 1
image
Computers and Technology, 23.06.2019 01:00, EhHannuh6865
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
image
Computers and Technology, 23.06.2019 01:10, kristofwr3444
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
image
Computers and Technology, 23.06.2019 06:00, Disd112984
Which statement is true of web-based social media? a. they allow consumers to interact with and update content. b. they cannot be updated easily, as compared to print media. c. they are expensive to produce and maintain, as compared to print and television. d. they can exist independent of the internet.
Answers: 1
You know the right answer?
The goal of this assignment is for you to become more proficient with file i/o, using functions, and...

Questions in other subjects:

Konu
History, 03.08.2019 09:10
Konu
History, 03.08.2019 09:10