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 function pangram takes as arguments the input file and output file that are specified in the program) A pangram is a sentence that contains all the letters of the English alphabet at least once. For example, 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 5 sentences), 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: Text that you write to the output file (output.txt) is case sensitive - please use all lower case when you write to the output file. Moreover, the example provided here is only representative and has been formatted to look good in pdfs, take a look at the sample input and output files for a precise formatting of what your program will actually read in and should output. You can assume that input.txt contains all the letters are in lower case. Please use the sample test cases provided to test your code locally and submit your solution to Autolab for grading. For the purpose of this assignment, you do not need to do any specific error checking on the files. Your program can assume that the files exist (for the input file) or can be created or overwritten (for the output file).
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 function pangram takes as arguments the input file and output file that are specified in the program) A pangram is a sentence that contains all the letters of the English alphabet at least once. For example, 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 5 sentences), 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: Text that you write to the output file (output.txt) is case sensitive - please use all lower case when you write to the output file. Moreover, the example provided here is only representative and has been formatted to look good in pdfs, take a look at the sample input and output files for a precise formatting of what your program will actually read in and should output. You can assume that input.txt contains all the letters are in lower case. Please use the sample test cases provided to test your code locally and submit your solution to Autolab for grading. For the purpose of this assignment, you do not need to do any specific error checking on the files. Your program can assume that the files exist (for the input file) or can be created or overwritten (for the output file).
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Make sure to show the full code with the screenshot of the output.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
Where is the screenshot of the terminal? How do I know whether this code works completely? I need to see the output.
Solution
by Bartleby Expert
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education