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 a-piece abide 1 1 net/thinkcs/python/english3e/dictionaries.html[1/4/2012 9:38:26 PM] to Think Like a Computer Scientist: Learning with Python 3 able 1 about 94 above absence 1 absurd How many times does the word, alice, occur in the book? 4. What is the longest word in Alice in Wonderland? How many characters does it have?
Q: Describe TCP/four IP's abstraction levels.
A: Intro The four abstraction layers are the link layer (lowest layer), the Internet layer, the transpo...
Q: Assume an ADT Stack which consists of the following attributes: struct StackNode { int item; StackNo...
A: A stack is a data structure that is used to store value in a manner of Last in First out. This means...
Q: In an RPC-like protocol, where numerous requests can be active at the same time and responses can be...
A: Introduction: Calling a Remote Procedure (RPC): Programmatically, Remote Procedure Call (RPC) is how...
Q: 10. Determine whether the following argument is valid or invalid. Include a truth table and a few wo...
A: Given: If 12 divides 709,438 then 3 divides 709,438. If the sum of the digits of 709,438 is divisibl...
Q: What security technologies did Cisco use to control the security of the building?
A: Intro According to STS (Security, technology and System) team the more important challenges that are...
Q: Type the program's output def compute (numbers): result 0 for num in numbers: result -- num + 3 retu...
A:
Q: Display the list of only leap years from years 2000 to 2025. If year/4 is equal to 0 and years/100 n...
A: #include <iostream>using namespace std;int main(){ int year; for(year=2000;year<=2025...
Q: Create a program that will ask user to input two numbers and choose from the four mathematical opera...
A: This question comes from Programming Language which is a paper of Computer Science. We have to creat...
Q: draw the hierarchy chart and design the logic for a program that calculates service charges for Haze...
A:
Q: Question #1: Given the following logic function: f(a,b,c,d) = E(2,3,8,10,13,15), perform each of the...
A:
Q: Simplify the following Boolean expressions using three variable k maps
A: K map is used to solve Boolean expression graphically.
Q: Explain the difference between main key, candidate key, and superkey..
A: Differentiation between main key, candidate key, and super key A super key is any collection of prop...
Q: iv) Write a Python program to input two integers t1, t2 from the user and then find the value of the...
A: Write a Python program to input two integers t1, t2 from the user and then find the value of the exp...
Q: What are the distinctions between EBS and Instance Store?
A: Amazon Elastic Container Service (Amazon ECS) is a cloud-based managed container runtime that makes ...
Q: blic int merge(BST nbt) { /*See BST.java for method specification */ // Hint: traverse bst using pre...
A: public class BSTImpl implements BST { private Node root; private int size; public BSTI...
Q: Create a program that will ask user to input two numbers and choose from the four mathematical opera...
A: Program Explanation: Declare the required header file Define the main function Declare variables ...
Q: The rook is a chess piece that may move any number of spaces either horizontally or vertically. Cons...
A: Given :- The rook is a chess piece that may move any number of spaces either horizontally or vertica...
Q: Write a C++ program that allows a cosmetic company to keep track of six different products: lipstick...
A: Use a loop to check the validation of input of each sale in the array and have two integers to track...
Q: Is it true that the external bus in the von Neumann design is just for data memory?
A: Introduction: The von Neumann architecture was created to store program and instruction data in the ...
Q: This program intends to display the user's favorite food. Declare String favoriteFood Display "What ...
A: Given: To write a program that displays users favorite food. Program is written in Java.
Q: Write a program to convert a US Customary System length in miles, yards, feet and inches to a Metric...
A: Logic:- read miles, yards, feet and inches. Use formula to calculate total_inches,total_meters and...
Q: 3. Write a program that will input non-negative integer and would display the prime factors of the g...
A: Here is the approach to achieve this :- Get the input from the user and call the prime factor func...
Q: The Linux operating system is a very popular server OS. A network administrator has to protect the l...
A: the code is an given below :
Q: Write an improved version of the futval.py program from Chapter 2. Your program will prompt the user...
A: Please refer below for your reference of code and output screenshot: print("Enter the investment amo...
Q: Give an example of how the 'Event Table' may be checked to confirm that the design is correct.
A: The event table is a database table that the user creates, often in the same schema as the applicati...
Q: tly is a Compiler?
A: given - What exactly is a Compiler?
Q: Personal computer should be defined
A: Introduction: Microprocessor technology is used in personal computers, making the processor tiny. T...
Q: What is the advantage of using sliding window over the stop-and-wait protocol as a solution to the r...
A: Pleae refer below for your reference:
Q: What examples of each SOA principle in service implementation did you find? Standarized service cont...
A: explain SOA principle in service implementation standarized service contract loose coupling service ...
Q: What is a distributed denial of service assault, and how can a single individual coordinate one?
A: Intro The question is about distributed denial of service assault, and how can a single individual...
Q: Disjoint and overlapping constraints are two different types of rules.
A: The disjoint rule forces subclasses to have disjoint sets of entities. The overlap rule forces a sub...
Q: What are the fundamental concepts of a wireless network?
A: The problem is based on the basics of networking.
Q: What are the fundamental integration problems associated with the deployment of Internet of Things d...
A: 1) Compatibility and interoperability of different IoT systems:- According to McKinsey's finance spe...
Q: public class TwoColors public static void main( { Scanner in = new Sca System.out.print("En // Step ...
A: The given problem is related to Java programming where the program will take 2 input strings of colo...
Q: embedded Write an ARM program : Void foo() q=20 Void foo1() For (j=0 ; p50 ) k++ } }
A: The given program: Void foo() q=20 Void foo1() For (j=0 ; p<j ; j++){ foo2 } Void foo2(){ p++ If ...
Q: Write a program called alice_words.py that creates a text file named alice_words.txt containing an a...
A: Python code to count no of occurrence of each word import string text = open("alice_words.txt", "r"...
Q: ined the best network design to ensure the security of internal access while retaining public websit...
A: Configuring IPv4 Network Network configuration comes in two stages: hardware integration, and then c...
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: Why could we choose a non-BCNF architecture for a relational database?
A:
Q: When there is a security breach what are some network tools and strategies that would first be used ...
A: A security breach is any incident that results in unauthorized access to computer data, applications...
Q: What exactly is Android Pie?
A: Introduction: Before being bought by Google in 2005, Android, Inc., a software firm based in Silicon...
Q: What is the definition of a high-level programming language?
A: Introduction: A high-level language (HLL) is a programming language, such as C, FORTRAN, or Pascal, ...
Q: What are the specific negative consequences happen when FTP File Transfer Protocol and real time str...
A: consequences given below :
Q: Learn about wearable computing, including products such as the Apple Watch and Android Wear, and com...
A: Introduction: Wearable computing and artificial intelligence refer to computer-powered equipment o...
Q: O Mitigation and Security Control Recommendation: Discuss how you fix this vulnerability. Can you pa...
A: the answer is
Q: Let G = ({S,A,B,C,D,E,Z},(0,1),R,S), where R = {S → E | Z; E → A | C; A → 01B | 0A | ; B → 1B | 10A...
A: Introduction: Here we are required to to perform the asked questions on given set G = ({S,A,B,C,D,E,...
Q: Given the following control points: (00 0); (0 1 0); (21 0); (20 0) and (1 0 0). The knot vectors ar...
A: Given the following control points: (000); (010); (2 1 0); (200) and (100). The Imot vectors are non...
Q: Contrast the iOS and Android smartphone operating systems. Which is superior?
A: Intro The question is about Contrast the iOS and Android smartphone operating systems. Which is supe...
Q: what is the relationship between sequence size and window size to avoid problems in recognizing betw...
A: Sr protocol is used in place of selective repeat protocol which is a data link layer protocol...
Q: What is embedded Linux?
A: INTRODUCTION: We need to tell what is Embedded Linux.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- 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 a program that reads student data from a file, compute their GPA and writes the results to a different file. 1. The user should have the option to either enter their text file that contains the student grades or use the provided text file that contains theinformation. The data in "indata.txt" should look similar to this, Lara_Croft75 70 91 69 89Chris_Redfield68 88 79 85 94Johnny_Cochran69 98 95 77 80Wanda_Maximoff84 86 98 95 92Luke_Skywalker74 96 80 98 97William_Kurt89 52 99 81 58Samuel_Jackson50 96 50 64 95END_OF_FILE This is supposed to be in python. This is what I have so far. I have no experience I apologise. I am trying to finish the GPA calculating program currently but am having trouble finishing it. grade = input("enter grades")points = 0 if grade is 90-99:total_points = 4.0if grade is 80-89:total_points = 3.0if grade is 70-79:total_points = 2.0if grade is 60-69:total_points = 1.0if grade is 50-59:total_points = 0.0gpa = total_points/len(grade)print(gpa,"is gpa")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…
- Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number and display whether it is valid. An account number is valid only if the last digit is equal to the remainder when the sum of the first five digits is divided by 10. For example, the number 223355 is valid because the sum of the first five digits is 15, the remainder when 15 is divided by 10 is 5, and the last digit is 5. Write only valid account numbers to an output file, each on its own line.*Note that the contents of the file AcctNumsIn.txt will change when the test is run to test the program against different input. AcctNumsIn.txt 345619789400871208901156984334723422172257100000273699237485761200555500936716763542999995 import java.nio.file.*;import java.io.*;import java.nio.channels.FileChannel;import java.nio.ByteBuffer;import static java.nio.file.StandardOpenOption.*;public class ValidateCheckDigits {public static void main(String[] args) {Path…Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number and display whether it is valid. An account number is valid only if the last digit is equal to the remainder when the sum of the first five digits is divided by 10. For example, the number 223355 is valid because the sum of the first five digits is 15, the remainder when 15 is divided by 10 is 5, and the last digit is 5. Write only valid account numbers to an output file, each on its own line.*Note that the contents of the file AcctNumsIn.txt will change when the test is run to test the program against different input. AcctNumsIn.txt345619789400871208901156984334723422172257100000273699237485761200555500936716763542999995 ValidateCheckDigits.javaimport java.nio.file.*;import java.io.*;import java.nio.channels.FileChannel;import java.nio.ByteBuffer;import static java.nio.file.StandardOpenOption.*;public class ValidateCheckDigits {public static void…Write a program in Python 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 grades of the students into a text file named…
- The teacher at a school needs help grading an exam with a number of True/False questions. The students’ IDs and test answers are stored in a file. The first entry of the file contains the answer to the test in the form: TTFTFTTTFTFTFFTTFTTF Every other entry in the file is the student’s ID, followed by a blank, followed by the students’ response. For instance, the entry: ABC54102 T FTFTFTTTFTTFTTF TF The student’s ID is ABC54102, answer to question 1 is True, the answer to question 3 is False. Also, the student did not answer question 2 and question 18. The exam has 20 questions. Here is the grading policy: each correct answer is awarded two points, each wrong answer get -1 point, and no answer gets 0 point. Write a program that processes the test data. The output should be the student’s ID, followed by the answers, followed by the test score (total points), followed by the test grade. Assume the following grade scale will be used: 90%-100%, A; 80%-89.99%, B; 70%-79.99%, C; 60%-69.99%,…IN JAVA ONLY PLEASE. POSITIVE REVIEW WILL BE LEFT FOR CORRECT LANGUAGE ONLY AND NOT COPY PASTE FROM INCORRECT ANSWER A photographer is organizing a photo collection about the national parks in the US and would like to annotate the information about each of the photos into a separate set of files. Write a program that reads the name of a text file containing a list of photo file names. The program then reads the photo file names from the text file, replaces the "_photo.jpg" portion of the file names with "_info.txt", and outputs the modified file names. Assume the unchanged portion of the photo file names contains only letters and numbers, and the text file stores one photo file name per line. If the text file is empty, the program produces no output. Ex: If the input of the program is: ParkPhotos.txt and the contents of ParkPhotos.txt are: Acadia2003_photo.jpg AmericanSamoa1989_photo.jpg BlackCanyonoftheGunnison1983_photo.jpg CarlsbadCaverns2010_photo.jpg CraterLake1996_photo.jpg…Write a program that reads the student information from a tab separated values (tsv) file. The program then creates a text file that records the course grades of the students. Each row of the tsv file contains the Last Name, First Name, Midterm1 score, Midterm2 score, and the Final score of a student. A sample of the student information is provided in Studentlnfo.tsv. 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 tsv file from the user. • Open the tsv file and read the student information. • 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: o A: 90 =< x o B: 80 =< x < 90 o C: 70 =< x < 80 o D: 60 =< x < 70 o F:x< 60 Compute the average of each exam. • Output the last names, first names, exam scores, and letter grades of the students into a text file named report.txt. Output one student per row and separate the…
- 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.Using JAVA 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. 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 Python program that reads each line of an input file temperatures.txt that consists of a town name followed by a set of temperatures. The program will then calculate the maximum, minimum, and average temperature and save them in a file called tempSummary.txt. For example, if the temperatures.txt contains Muscat 25 35 30 40 30 Suhar 20 30 25 25 Salalah 35 45 40 15 16 18 The file tempSummary.txt will contain Muscat: 25, 40, 32.00 Suhar: 20, 30, 25.00 Salalah: 15, 45, 28.17