Question: Using python, create a dictionary from a .txt file and use it to assist the user to know the name of a group of a

Using python, create a dictionary from a .txt file and use it to assist the user to know the name of a group of a particular animal.

  • An example format for the .txt file is seen below.

Using python, create a dictionary from a .txt file and use it

  • The expected output should follow this format.

to assist the user to know the name of a group of

The text in is either the user input to a question or the use of that input in the computer's response. A text file is included for you to run your program against, but your program should run for any valid file containing two columns of data. You will need to input and parse the file to make the necessary dictionary. If possible make the program run for plurals. An example would be to work for either "Bed" or "beds"

- O X 5 C:\Users\mpryo\Box Sync Classes\ME369\collecti.txt - Sublime Text (UNREGISTERED) Eile Edit Selection Find View Goto Tools Project Preferences Help M real goal of demo scifibookfavorites.txt x Heinlein 4 123 . collecti.txt x addre. Group Name Animal Type - - - - Band Bed Bed Bevy Bevy Brace Brood Cast Cete Charm 14 Chattering 15. Cloud Clowder Line 14, Column 25 gorillas clams oysters quail swans ducks chicks hawks badgers goldfinches choughs gnats cats 16 Tab Size: 4 Plain Text - O X What type of animal are you running from? collecti.txt X Major criticisms to address: 3 A of are coming to git you! What type of animal are you running from? 7 A of are coming to git you! 9 What type of animal are you running from? 11 A of are coming to git you! 12 What type of animal are you running from? 14 A of are coming to git you! What type of animal are you running from? "Exit" or "Quit" 19 A of got you! 20 21 *Exit* Line 9Column 18 Tab Size: 4 Plain Text

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