question archive Part 1 Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file

Part 1 Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file

Subject:Computer SciencePrice:2.87 Bought7

Part 1

Modify your program from Learning Journal Unit 7 to read dictionary items from a file and write the inverted dictionary to a file. You will need to decide on the following:

  • How to format each dictionary item as a text string in the input file.
  • How to covert each input string into a dictionary item.
  • How to format each item of your inverted dictionary as a text string in the output file.

Create an input file with your original three-or-more items and add at least three new items, for a total of at least six items.

Part 2

Copy your program from Part 1 and modify it to do the following:

  • Read the output file from Part 1 and create a dictionary from it (the inverted dictionary from Part 1).
  • Invert that dictionary.
  • Write the re-inverted dictionary to an output file.

It will be interesting to see if your original dictionary is reversible. If you invert it twice, do you get the original dictionary back?

Include the following in your Learning Journal submission:

  • The input file for your original dictionary (with at least six items).
  • The Python program for Part 1.
  • The output file for your inverted dictionary, which is also the input file for Part 2.
  • The Python program for Part 2.
  • The output file for your twice-inverted dictionary.
  • A description of any differences between your program for Part 1 and your program for Part 2.
  • A description of any differences between the original input file and the final twice-inverted output file.

Option 1

Low Cost Option
Download this past answer in few clicks

2.87 USD

PURCHASE SOLUTION

Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

rated 5 stars

Purchased 7 times

Completion Status 100%