Write a program to manage a dictionary

Assignment Help Basic Computer Science
Reference no: EM13306552

Write a program to manage a dictionary. Your dictionary should be stored on a text file named diction.txt and consist of an alphabetized list of words, one per line. When a user enters a word, scan the dictionary looking for the word. If the word is in the dictionary, say so. If not, display the dictionary word immediately preceding and the word immediately following so that user can see words that are close in spelling. Then ask whether the user wants to add this new word to the dictionary. If the answer is yes, do so and go back to request the next word.

To insert a word into a file in alphabetical order, simply copy the file to a new temporary file named diction.tmp and move words one at a time from the temporary file back to the original file, inserting the new word when you reach its correct position alphabetically. Turn in your source code and your diction.txt file.

 

Reference no: EM13306552

Questions Cloud

Find how much energy must be supplied to the refrigerator : An ideal refrigerator utilizes a Carnot cycle operating between 0 degrees Celcius and 18 degrees Celcius. How much energy must be supplied to the refrigerator
What is the net charge contained in the cylinder : A closed Gaussian cylinder sits centered around the z-axis and above the xy-plane with a length of A and a radius of R, What is the net charge contained in the cylinder
Interrogating technology sustinability : Interrogating technology:sustinability, environment and social change
Write a menu driven program : Write a menu driven program that allows the user to enter five numbers and then choose between finding the smallest , sum or average of the numbers.
Write a program to manage a dictionary : Then ask whether the user wants to add this new word to the dictionary. If the answer is yes, do so and go back to request the next word.
What was the maximum speed after it hit bottom : The initial height of the ball is 60.0m and has a potential energy and initial pe of 1176.00, What was the maximum speed after it hit bottom
Find pythagorean triplets : Given an array of integers, find Pythagorean triplets. i.e. find a,b and c which satisfies a^2 + b^2 = c^2 Integers could be positive or negative.
What is the maximum positive emf : The ems of an AC circuit has an rms value of 120V. What is the maximum positive emf
The meeting and implemented immediately : State the issues, as you know them, and request that the team members come with ideas so this problem can be resolved at the meeting and implemented immediately.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine the mix of cargo

The load master for a freighter wants to determine the mix of cargo to be carried on the next trip. The ship's volume limit for cargo is 100,000 cubic meters, and its weight capacity is 2,310 tons.

  Explain different kinds of feasibility studies

When deciding whether to buy and implement digital dashboard or management cockpit sometimes a feasibility study is conducted.  Explain the different kinds of feasibility studies.

  Control signals and label

Draw a diagram showing how the 68000 processor connects to a 64 KWord (64KB even + 64 KB odd) RAM IC. Show all relevant address, data, and control signals and label them correctly. Also show the MAD (memory address decoder) in your circuit diagram.

  Compute mean number of rounds per contention period

Determine the probability that the contention ends on round k, and compute the mean number of rounds per contention period?

  Create your own function that accepts one input parameter

Using Pseudocode, create your own function that accepts one input parameter and returns a float number. You decide the theme.

  Identify position-indicate what pattern is found in thread

Thread the sequence AATCGATAAGCAAAACCGGATTACGATATATAT through the tree. If any pattern is found in any position, identify that position and indicate what pattern is found.

  Illsutrate how bound seem realistic

Sufficient to assure with 90% confidence that the learned perceptron will have true error of at most 5%. Does this bound seem realistic?

  Produce algorithm pseudocode code flowchart for problem

Produce an algorithm, pseudocode code and flowchart for the following probelm: A customer in a store is purchasing five items. Design a program that ask for the price of each item, and then displays the subtotal of the sale, the amount of sales ta..

  Discuss any two major security flaws in us or anywhere

Discuss any two major security flaws in US or anywhere, one of which is a violation of Integrity, while the other is a violation of Confidentiality, with clear explain.

  Explaining discrete-time system which moves between states

A decision maker observes a discrete-time system which moves between states {s1,s2,s3,s4} according to the following transition probability matrix?

  The args designate the range

The args designate the range [lo, hi]. If lo > hi, then that designates the empty range (no numbers), in which case outputA returns without outputting any numbers. Otherwise, outputA outputs all the numbers in the range that are interesting.

  Explain dynamic programming approach-longest weighted path

Assume we have a directed acyclic graph G = (V, E) with real-valued edge weights and two distinguished vertices s and t. Explain a dynamic programming approach for ?nding a longest weighted simple path from s to t.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd