Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In python 3 please This should be what shold be in one a seperate text document callled 'places'. library:la biblioteca school:el colegio,la escuela restaurant:el restaurante

In python 3 please

This should be what shold be in one a seperate text document callled 'places'.
 
library:la biblioteca
school:el colegio,la escuela
restaurant:el restaurante movie theater:el cine airport:el aeropuerto museum:el museo park:el parque university:la universidad office:la oficina house:la casa

this should be a separate text document called 'verbs'

to search:mirar,buscar to play:jugar to be:ser,estar to run:correr to make:hacer to talk:hablar to take:tomar to study:estudiar to arrive:llegar to practice:practicar

image text in transcribed

image text in transcribed

image text in transcribed

Deliverables: You only need to submit your solution. You must use functions to modularize your work. You should use exception handling where necessary as well. Dictionaries, sets, and lists will come in helpful here 50 points off for programs that crash on expected input. Spanish Quiz 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 prog ram If youve ever taken a foreign language class, you may have studied for tests by creating flash cards to memone how a given word in a paricular 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. 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.t, display an error message and quit. You can use the listdir() function to get the contents of a directory import os contents = os.listdir() The variable contents is a list of all the items in the directory. You can then check to see if it ends in .txt to see if it is a text file. It should be case insensitive, so your program should identify words.txt, words. TXT, words.TxT, words.txt, etc as files ending in .txt 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

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_2

Step: 3

blur-text-image_3

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

More Books

Students also viewed these Databases questions