Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

https://faculty.utrgv.edu/emmett.tomai/courses/1370/04_arrays/largedictionary.txt Topics: Files, loops, functions, arrays Write a program that repeatedly asks the user to enter a word. After each word is entered, the program

https://faculty.utrgv.edu/emmett.tomai/courses/1370/04_arrays/largedictionary.txt

Topics: Files, loops, functions, arrays

Write a program that repeatedly asks the user to enter a word. After each word is entered, the program tells the user if the word is correctly spelled or not.

Sample run:

Welcome to the spell checker! Please enter a word:

> apple

The word apple is spelled correctly!

Enter another word:

> snake

The word snake is spelled correctly!

Enter another word:

> compooter

WHOA! compooter isnt a word! Bad human! Learn to spell!

> dinosore

WHOA! dinosore isnt a word! Bad human! Learn to spell!

To solve this problem: Download the following text file to your program directory. This file is a dictionary listing ALL THE WORDS IN THE ENGLISH LANGUAGE: largedictionary.txt

This file contains exactly 202,412 words (you may use this number to decide how big to make your array, if you like). A very smart approach is to create a smaller version of the dictionary (say 10 words) for testing to get things working first.

Suggestion: Break the problem down into steps. For example, you might implement the following pseudo code:

1)Create a giant array. Read each word in from the dictionary file and store the word in the array.

2)Enter a loop in which you ask the user to enter a word.

a)Check if the word entered is in your giant array of words.

i)If so, congratulate the user.

ii)If not, berate the user for their flawed spelling.

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

Step: 3

blur-text-image

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

Fundamentals of Corporate Finance

Authors: Stephen A. Ross, Randolph W. Westerfield, Bradford D.Jordan

8th Edition

978-0073530628, 978-0077861629