Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

  • The expected output should follow this format.

image text in transcribed

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

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

PostgreSQL Up And Running A Practical Guide To The Advanced Open Source Database

Authors: Regina Obe, Leo Hsu

3rd Edition

1491963417, 978-1491963418

More Books

Students also viewed these Databases questions