3. Write a program called alice_words.py that creates a text file named alice_words.txt containing an alphabetical listing of all the words, and the number of times each occurs, in the text version of Alice's Adventures in Wonderland. (You can obtain a free plain text version of the book, along with many others, from http://www.gutenberg.org.) The first 10 lines of your output file should look something like this: Word Count a 631 а -piece abide 1 1 t.net/thinkcs/python/english3e/dictionaries.html[1/4/2012 9:38:26 PM] v to Think Like a Computer Scientist: Learning with Python 3 able 1 about 94 above 3 absence 1 absurd 2
Q: programme counter
A: In step 2, I have provided answer.
Q: A trigger's execution might result in the execution of another action. The depth of nesting in most ...
A: A trigger's execution might result in the execution of another action. The depth of nesting in most...
Q: How would you go about resolving the issue of false sharing that can occur?
A: Basics: In frameworks with convenient, lucid stores at the smallest asset block controlled by the re...
Q: What is regression testing?
A: Solution - We have to tell what is regression testing.
Q: Give examples of five general responsibilities of a database administrator.
A: A DBA is frequently involved in the initial setup of a modern Oracle, SQL Server, or other database....
Q: Explain what distributed databases and distributed processes are and give at least one example of ea...
A: Introduction: A distributed database is a collection of linked databases that are geographically dis...
Q: Employees of a university have to follow a specific procedure to get reimbursed for travel they the ...
A: Activity diagram is used to depict the complete process structure in form of a pictorial diagram rep...
Q: For what reason is it a good idea to hash a password that is saved in a file rather than encrypting ...
A: It a good idea to hash a password that is saved in a file rather than encrypting that password. We w...
Q: What is the minimum possible weight of a spanning tree T 3 3 5 2 O 26 O 21 18 13 17 2.
A: The solution to the given problem is below. ***Note: According to Bartleby policy we are not allow...
Q: 1 kinclude 2 3E int main() { 4 int n,h,i,s=0; int low=e,rough=e,rugged=e,high=e,DIDNOTQUALIFY=@; pr...
A: answer is
Q: Write a java program that will take a text as input and convert the first letter of each word into ...
A: Java is a high-level, class-based, object-oriented programming language that is designed to have as ...
Q: Design N – bit add-sub unit using behavioral VHDL model
A: The behavioural model in VHDL describes how the circuit behaves. This behavioural model is the highe...
Q: Which form of process scheduling may be shown to be provably optimal?
A: The solution to the given problem is below.
Q: Define the number of CPU clock cycles.
A: CPU clock cycles define below :
Q: List and justify the three design objectives for relational databases.
A: Each table entry in a relational database is a document called the essential item, which has a uniqu...
Q: How did early operating systems differ from the goals of today's operating systems in terms of their...
A: How did early operating systems differ from the goals of today's operating systems in terms of their...
Q: Consider the graph in Figure 1. Unless otherwise indicated, always visit adjacent nodes in alphabeti...
A:
Q: Search online to identify the five fastest supercomputers currently in operation. Who sponsors these...
A: Lets see the solution in the next steps
Q: ow would you use the system development life cycle (SDLC) method to solve: Suppose you are an ana...
A: Given :- Suppose you are an analyst developing a new executive information system intended to provid...
Q: ssume you receive real-estate data for 1000 samples as input and each sample has 25 different featur...
A: SUMMARY: - Hence, we discussed all the points.
Q: what value would be returned based on the formula in cell A94
A: Ans is option 4 46npbb The value that would be returned based on the formula [=COUNTIF(A43:A47,...
Q: Develop a context diagram and a level-0 diagram for the contracting system described in the followin...
A:
Q: 1.Define a JavaScript function that takes a parameter and prints the datatype of that parameter in t...
A: Define a JavaScript function that takes a parameter and prints the datatype of that parameter in the...
Q: a relational datab
A: given - Why would we pick a non-BCNF architecture for a relational database?
Q: How do you determine which form of process scheduling is the most effective in a timesharing environ...
A: Environment for timesharing: The round robin process scheduling mechanism is employed when working i...
Q: The Google search engine has a capability that allows web sites to show Google adverts. The advertis...
A: Google ads are nothing more than adverts on web pages; if a user visits a website that has Google ad...
Q: Why is it necessary for the maximum packet lifetime to be large enough to ensure that not only the p...
A: To explain the statement "Why is it necessary for the maximum packet lifetime to be large enough to ...
Q: Write a java program to check if a list of integers contains only odd number. Please do it using par...
A: Required:- Write a java program to check if a list of integers contains only odd numbers. Please do ...
Q: Create a definition for the Java virtual machine.
A: The answer of this question is as follows:
Q: te an EBNF description for a Java class definition header statement te a BNF description of the Bool...
A: 1.A Java class definition header statement <class_head> ® {<modifier>} class <id>...
Q: Lab Goal : The lab was designed to teach you how to use arrays to simplify solving more complex prob...
A: Here is the answer:-
Q: Describe the two opposing viewpoints on the construction of the kernel of an operating system
A: Given The answer is given below
Q: MCQS OF SOFTWARE QUALITY ASSURANCE 1.Testing the application as a whole for the modification in any ...
A: Note: Since the question is multipart we are advised to do only first three parts. Kindly post other...
Q: Which of the following is the solution using the Master Theorem for the recurrence relation T(n)=4T(...
A: Consider the given Data:
Q: Personal computer should be defined.
A: Answer:
Q: Write buffer should be defined.
A: Introduction: A write buffer is a particular type of data buffer used in certain CPU cache architect...
Q: In what ways does a binary tree resemble a linked list?
A: Introduction: A tree has branches—-each node refers to one or more descendant nodes. A binary tree i...
Q: implement a search algorithm to apply to a particular problem they are facing. The problem has the f...
A: The problem has the following characteristics:● The graph representing the problem has a very high f...
Q: What are the advantages of ICT? What is the signifincance of ICT?
A: ICT: ICT stands for Information and Communication Technologies ICT refers to technologies that provi...
Q: What is regression testing?
A: Below is then answer of regression testing. I hope this will behelpful.
Q: 10. Insert the following records to BOOKS table: BookID Category Title Price Writer 1 IT SQL 50 Khal...
A: Solution : Here, in BOOKS table there 5 columns. The books details are shown in table. In above qu...
Q: The several methods of file access are listed here. I'm wondering about the benefits and drawbacks o...
A: Introduction: The most basic file access method is: File organization is nothing more than gathering...
Q: nsider a singly linked list of the form Y create a new node as shown below; ew node(); a=100; h is t...
A: SUMMARY: - Hence, we discussed all the points.
Q: how Linux may be used in several elements of rocket technology
A: Linux is an open source operating system that is highly secured.
Q: Consider the following function in answering the questions below. int a, int b, int c; int temp; if ...
A: There are two parts in this question, In first part we are asked to develop test input to cover 100%...
Q: Project Name: Phone Call Detector 1. Flowchart 2. Introduction/Rationale
A: Cell phones are widely used in the world. While people have to be connected to one another, there ar...
Q: Explain why each of the three design objectives for relational databases is beneficial.
A: Let's see the solution in the next steps
Q: What are the applications of Subneting?
A: According to the question the subnet allows to the community to carry out speedy and makes the commu...
Q: Identify the similarities and differences of Media Literacy, Information Literacy, and Digital/Techn...
A: Media Literacy: The capacity to critically assess and evaluate media information is referred to as ...
Q: Use a one-dimensional array to solve the following problem. Read in 20 numbers, each of which is bet...
A: The answer is
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
Keeps saying FileNotFoundError: [Errno 2] No such file or directory: 'alice.txt'
I have downloaded the book as a text file from Gutenberg like the question recommended. What should I do?
- Write a program that opens a text file called quiz.txt for reading. This file contains a single linewith a student’s first name then one space, then the student’s last name, then one space, then somenumber of quiz scores that, if they exists, are separated by one space. The student will have betweenzero and ten scores (inclusive), and each score is an integer between 0 and 100 (inclusive). The filemay or may not end with a new line character. Your program will read the data from this file andwrite its output to a second file. The data in the output file (named average.txt) will contain thestudent’s quiz scores followed by the average of the student’s quiz scores.The output file must be formatted as described below.1. Each quiz score should be listed in a right-justified column that is 4 characters wide. Notethat if a student has fewer than 10 scores (they have missed one or more of the quizzes), yourprogram will need to display the missing score(s) using 0 for each one.2. The average…Write a program countfile.c that calculates and prints on screen the number of bytes or number of lines in a file. To print the number of lines in the file myfile.txt, the program is run from the command line with two arguments as follows countfile.exe -l myfile.txt or, to print the number of bytes in the file myfile.txt, it would be run as countfile.exe -b myfile.txt EXAMPLE: Suppose the file myfile.txt contains the following samantha jacob 58 91 Then running countfile.exe -l myfile.txt would print 4 on the screen. And running countfile.exe -b myfile.txt would print 15 on the screen. If as a switch anything other than -l or -b is used, the program should give an error message and exit with code 1. If the file is not found, then it should give a message saying no such file exists, and exit with code 2. If everything runs correctly the program should return 0.Write a program, and store it in a file called Travel Expenses.xlsm, that does the following: (a) It asks for a person’s first name and stores it in firstName; (b) it asks for a person’s last name and stores it in lastName; (c) it asks for the number of miles the person traveled on a recent trip and stores it in nMiles; (d) it asks for the average miles per gallon the person got on the trip and stores it in milesPer- Gallon; (e) it asks for the average price per gallon paid for gas on the trip and stores it in avgPrice; (f) it calculates the cost of the trip and stores it in tripCost; and (g) it displays a message such as "Bob Jones traveled 800 miles, got 31.3 miles per gallon on average, paid $3.49 per gallon on average, and paid a total of $89.20 for gas." Make sure there is an Option Explicit line at the top of the module and that you declare all of your variables appropriately.
- Write a program that asks any number of students to enter their final grade and enables you to store these grades into a grades.txt plain text file. Then it reads the grades from the grades.txt file, and displays the individual grades and their count and average.Your client owns a bookstore, and they need to process an input file containing the titles of all their books to remove duplicates. Write a program that reads all of the titles from an input file called SamsBookstore.txt and writes them to an output file called SamsDuplicates.txt. When complete, the output file should contain all duplicated titles found in the input file. For JAVA code Create a text file using the following books: And Then It's Spring Baby Bear Sees Blue Beach Feet Jimmy the Greatest! Boot & Shoe Boy & Bot Cat Tale Creepy Carrots! Jimmy the Greatest! Dog in Charge Eggs 1 2 3 Extra Yarn Ganesha's Sweet Tooth Green Happy Like Soccer H.O.R.S.E.: A Game of Basketball and Imagination The Insomniacs Boy & Bot It's a Tiger! Jimmy the Greatest! King Arthur's Very Great Grandson Me and Momma and Big John The Quiet Place Robin Hood Step Gently Out Up, Tall and High Z Is for Moose The Elephant's Friend and Other Tales from Ancient India.…Write a program that reads student information from a text file, then creates a text file that records the course grades of the students and a final grade. Each row of the .txt file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student, each separated by a space. A sample of the student information is provided in StudentInfo.txt below. Assume the number of students is at least 1 and at most 20. The program performs the following tasks: • Read the file name of the .txt file from the user. • Open the .txt file and read the student information using readline() or readlines(). • Compute the average exam score of each student. • Assign a letter grade to each student based on the average exam score in the following scale: ◦ A: 90 =< x ◦ B: 80 =< x < 90 ◦ C: 70 =< x < 80 ◦ D: 60 =< x < 70 ◦ F: x < 60 • Output the first names, last names, exam scores, and letter…
- Write a program called ReverseText.exe that takes two file names as command-line arguments. TheReverseText program should reads the characters from the first file and write them into the second file inreverse order. Test your program out using the small text file iso_8859-1.txt provided with thisassignment. Once you are confident that your program is working correctly, run it on the much larger fileWar_of_the_Worlds.txt uploaded along with this assignment. For example, when you use this program on the command line it should be like this:ReverseText.exe War_of_the_Worlds.txt War_of_the_Worlds_reversed.txt Remember, if you are using fgets(), it will only return one line of the book at a time. You willhave to go through the book multiple times and make frequent use of the rewind() function.HintYou can use the strlen() function (that is part of the string.h C Standard Library) to check thelength of the string you read in using fgets(). ALSO, if you could please help me know and…Write a program that prompts the user for an input file name, reads all words from the input file, and writes the words to the output file named sentences.txt. Start a new line whenever a word ends in a period, question mark, or exclamation mark.In Python IDLE Write a program that reads the file’s contents and determines the following: The number of uppercase letters in the file The number of lowercase letters in the file The number of digits in the file The number of whitespace characters in the file Then the program should do a mass replacement of all spaces with a ‘-‘, and then replace any uppercase letters with lowercase letters. After the replacement of the spaces, the count of letters, digits, and spaces should be rerun, the number of replacements indicated, and a second report of letters, digits and spaces should be printed. Save the results of the changes in a file named “testoutput.txt”. This file must be submitted as part of the submission for your lab. Output should look like this: Uppercase letters: 20 Lowercase letters: 310 Digits: 4 Spaces: 82 >>> Hint: This program does not need to use any lists – the entire file can be read into one string. Problem 2. Date Printer - Write a program…
- Create a text file of names, (3 names per line, 5 lines in total) followed by an age for each name. Go through the file and sum the ages. Create an output file with each persons name followed by age and then a line at the end of the output file that says “sum of all ages is: x”. Simple Java programming. Should include things like bufferedReader, fileReader, printWriter, fileWriter, file close, try-with-resources, Scanner, catch/try, etc. Include Java file and txt file. Thank you.Write some code that will create a stream named outStream that is anobject of the class PrintWriter and that connects this stream to a textfile named sam.txt so that your program can send output to the file. Ifthe file sam.txt does not exist, create a new empty file. However, if a filenamed sam.txt already exists, erase its old contents so the program canstart with an empty file with that name.Assume that you will be given a *.txt file, which in the same format of RandSource.txt(attached). The file has three numbers at each line. Numbersare separated with a space. All number are in the range of [0, 50]. The first two numbers indicate a range. The third one shows number of random numbers to be generated in the range of first two numbers. The range always given in first < second order. If not, raise an error. For instance, 2 5 7 means that you need to generate 7 random numbers in the range of 2 - 5 (including 2 and 5). You need to develop a complete C++ program to read each line from the .txt file and print the result on screen in a formatted way. The output format will be <first number> - <second number>: <random numbers > . For the above example, the output to screen should be 2 - 5: 6 5 4 6 3 7 5The attached input file has,3 6 82 19 104 12 41 6 07 4 30 8 310 9 8Your program should generate this (or with different random numbers) output for this file3…