Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(these are the .txt files) input1.txt we promptly judged antique ivory buckles for the next prize. nymphs blitz quick vex dwarf jog. djs flock by

image text in transcribed

(these are the .txt files)

input1.txt

we promptly judged antique ivory buckles for the next prize. nymphs blitz quick vex dwarf jog. djs flock by when mtv ax quiz prog. big fjords vex quick waltz nymph. bawds jog, flick wartz, vex nymph.

output1.txt

true true true true false

Write a program with OCaml. Your program will consist of a function that accepts two strings. Each string is the name of a file. The first is the name of an input file and the second is the name of an output file. Name the function pangram. (Note that your program can also make use of other helper functions. Just make sure the function pangram takes as argument a pair of string describing the input file and output file.) A pangram is a sentence that contains all the letters of the English alphabet at least once. For example, the following sentence: the quick brown fox jumps over the lazy dog is a pangram. The program you are to write must read in an input file (input.txt, a plain text file which contains some sentences, one on each line), line by line and check if the line read is a pangram or not. If the sentence read is a pangram, it writes true to the output file. If it is not, it writes false to the output file. For example, if input.txt contains: we promptly judged antique ivory buckles for the next prize. how quickly daft jumping zebras vex. pottery is an art. crazy fredrick bought many very exquisite opal jewels. mr. dumbledore is a funny name for a dog. Then your program must output the following to the output.txt: true true false true false NOTE: The text that you write to the output file (output.txt) is case sensitive - please use only lower-case letters when you write to the output file. Moreover, the example provided here is only

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

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions

Question

2. Is health care leadership only about competencies or skills?

Answered: 1 week ago