Question: Write a program that prompts the user to enter the name of a text file, uses the filename to open and read the file

Write a program that prompts the user to enter the name ofa text file, uses the filename to open and read the filecontents, and then displays the number of occurrences of each alphabetic letterin the file. Letters are case insensitive. Here's a sample run using

Write a program that prompts the user to enter the name of a text file, uses the filename to open and read the file contents, and then displays the number of occurrences of each alphabetic letter in the file. Letters are case insensitive. Here's a sample run using the attached billOfRights.txt file: For the ADA compliant version of this image, please select the file Assignment_Files & Arrays_Image Alt Text The contents of the bill of Rights.txt file has the following character count: Number of As: 290 Number of Bs: 84 Number of Cs: 134 Number of Ds: 146 Number of Es: 563 Number of Fs: 125 Number of Gs: 68 Number of Hs: 193 Number of Is: 310 Number of Js: 8 Number of Ks: 6 Number of Ls: 164 Number of Ms: 97 Number of Ns: 322 Number of Os: 319 Number of Ps: 91 Number of Qs: Number of Rs: 262 Number of Ss: 296 Number of Ts: 443 Number of Us: 115 Number of Us: 4253592126 49 Number of Ws: 52 Number of Xs: 11 Number of Ys: 52 Number of Zs: The Bill of Rights Congress of the United States, begun and held at the City of New York, on Wednesday the fourth of March, one thousand seven hundred and eighty nine. THE Conventions of a number of the States, having at the time of their adopting the Constitution, expressed a desire, in order to prevent misconstruction or abuse of its powers, that further declaratory and restrictive clauses should be added: And as extending the ground of public confidence in the Government, will best ensure the beneficent ends of its Institution. RESOLVED by the Senate and House of Representatives of the United States of America, in Congress assembled, two thirds of both Houses concurring, that the following Articles be proposed to the Legislatures of the several States, as amendments to the Constitution of the United States, all, or any of which Articles, when ratified by three fourths of the said Legislatures, to be valid to all intents and purposes, as part of the said Constitution; viz. ARTICLES in addition to, and Amendment of the Constitution of the United States of America, proposed by Congress and ratified by the Legislatures of the several States, pursuant to the fifth Article of the original Constitution. Amendment I Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances. Amendment II A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed. Amendment III No Soldier shall, in time of peace be quartered in any house, without the consent of the Owner, nor in time of war, but in a manner to the prescribed by law. Amendment IV The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment V No person shall be held to answer for a capital, or otherwise infamous crime, unless on a presentment or indictment of a Grand Jury, except in cases arising in the land or naval forces, or in the Militia, when in actual service in time of War or public danger; not shall any person be subject for the same offence to be twice put in jeopardy of life or limb; nor shall be compelled in any criminal case to be a witness against himself, nor be deprived of life, liberty, or property, without due process of law; nor shall private property be taken for public use, without just compensation. Amendment VI In all criminal prosecutions, the accused shall enjoy the right to a speedy and public trial, by an impartial jury of the State and district wherein the crime shall have been committed, which district shall have been previously ascertained by law, and to be informed of the nature and cause of the accusation; to be confronted with the witnesses against him; to have compulsory process for obtaining witnesses in his favor, and to have the Assistance of Counsel for his defense. Amendment VII In Suits at common law, where the value in controversy shall exceed twenty dollars, the right of trial by jury shall be preserved, and no fact tried by a jury, shall be otherwise re- examined in any Court of the United States, than according to the rules of the common law. Amendment VIII Excessive bail shall not be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted. Amendment IX The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people. Amendment X The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people. Essential Facts about the Bill of Rights The Bill of Rights consists of the first ten amendments to the United States Constitution The United States Constitution was adopted on September 17, 1787 by the Constitutional Convention. After ratification, it took effect on March 4, 1789. Opponents of the Constitution argued that it was too vague and assigned too much power to the federal government. In some states, it was only ratified because citizens held out hope of future amendments that would more clearly limit the power of government. Supporters of the Bill of Rights saw it as a means of expressing clearly and unequivocally the rights of individual citizens while also limiting the power of government over its citizens. The framers of the Bill of Rights were influenced by the Virginia Declaration of Rights (1776), the English Bill of Rights (1689), and the Magna Carta (1215). Twelve amendments were originally proposed to the first Congress in 1789. The first two, which concerned the number of constituents required for each representative and pay for congressmen, never became law. After ratification by three-fourths of the states, the ten amendments that make up the Bill of Rights went into effect on December 15, 1791. The contents of the billofRights.txt file has the following character count Number of As: Number of Bs: 290 84 Number of Cs: 134 Number of Ds: 146 Number of Es: 563 Number of Fs: 125 Number of Gs: 68 Number of Hs: 193 Number of Is: 310 Number of Js: Number of Ks: 98 6 Number of Ls: 164 Number of Ms: 97 Number of Ns: 322 Number of Os: 319 Number of Ps: 91 Number of Qs: 4 Number of Rs: 262 Number of Ss: 296 Number of Ts: 443 Number of Us: 115 Number of Vs: 49 Number of Ws: 52 Number of Xs: 11 Number of Ys: 52 Number of Zs: 6

Step by Step Solution

3.39 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Prompt the user to enter the name of a text file and read the file contents In this step we will pro... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!