Thirukkural is a popular literary work in Tamil. It consists of 1330 verses, each verse having 2 lines. These verses are grouped into 133 chapters, each chapter having 10 verses. Suppose these verses are written in a text file consisting of 2660 lines. Give a line number from 1 to 2660, you must find the chapter number (1 to 133), verse number (1 to 10) and the line number ( 1 or 2 ). Write a program to implement the above scenario.
Q: Use the pumping lemma for context-free languages to show that the language L = {an | n is a power o...
A: The given language is: L = {an | n is a power of 2} To prove: L is not context-free.
Q: b) Sort the sequence 3, 1, 4, 8, 7, 9, 2, 6, and 5 in ascending order using merge sort. Show all ste...
A: Here, we are going to sort the given sequence in ascending order using Merge sort. Merge sort uses D...
Q: Write a C++ program to use an STL set to store integer values. Demonstrate any THREE (3) set operat...
A: PROGRAM EXPLANATION: Include the header file. Define the main function. Create a set (STL) and add ...
Q: Use the given string and generate the following output. String = 'A BATA BTATB ABTA T' Output1 = [('...
A: Since no programming language is mentioned, I am using python. Algorithm: Start Initialize s='A BAT...
Q: "Divide and conquer" is one of the most fundamental ideas that guide software engineering practice, ...
A: Introduction: Compound instructions, algorithms, and data structures come to mind when people genera...
Q: describe the significance of information technology (IT) in a new functional area that has been form...
A: Introduction: An information system is beneficial in all aspects of the business (5 primary business...
Q: 10. Q1 : What is an atomic instruction? Show that if the wait operation is not executed atomically,...
A: I have answered this question in step 2.
Q: Create a case problem with the application of liner programming distribution models (assignment prob...
A: Task : Formulate the sample LLP problem. Define : 1.Decision variable 2. Objective function 3. Con...
Q: Explain the usefulness and limitations of traffic engineering as a solution for the problem of netwo...
A: The Answer is in step2
Q: In C Programming, what are: 1) Arrays 2) Strings 3) Pointers
A: According to the question in the c programming contain various type of the user define function whic...
Q: Let f be a function from the set of length 10 binary numbers to the set of subsets of A={1, 2, ...,1...
A: Let f be a function from set A to set B. If f is a one-to-one correspondence( one-to-one, and onto),...
Q: JAVA PROGRAMMING: Lesson – Overloading Constructors 1.Create a class named House that includes data...
A: As per the requirement program is done in the java. House.java and I_house.java should place in only...
Q: Can you exlplain with comments following data .data prompt byte1 "Input number1:-" mynumber1 byte1 ...
A: The given code swaps two number from different memory with the use of temporary variables.
Q: Each cloud provider has a product blueprint related to Big Data. Name and explain just one of the a...
A: what is Cloud Computing technique: The term cloud computing is the delivery of computing services ...
Q: fun g(a, b, c, d) = if c[b(a)] < 1.2 then 2 * b(a) else 2 * d * a Using Hindley-Milner type...
A: fun g(a, b, c, d) = if c[b(a)] < 1.2 then 2 * b(a) else ...
Q: MATLAB When having a two-dimensional lattice, in lexocographic order I need to be able to move arou...
A: Code: K = 16; h = sqrt(K); lex=zeros(h,h); iup=zeros(1,K); idn=zeros(1,K); x=zeros(1,K...
Q: In this c# program please provide the height (feet and inches) in this program and please show the p...
A: In this question, we are asked to modify the code to that user can able to add height and calculate ...
Q: What exactly is a data race?
A: Introduction: A data race happens when two or more threads in the same process simultaneously visit ...
Q: In this section, we will discuss the potential and benefits of a LoT oriented approach versus an M2M...
A: Introduction: In recent years, the Internet of Things (IoT) has become as much of a buzzword as the ...
Q: Insert in an initially empty 2-4 tree, the following sequence of keys (in the given order): { 8,12,1...
A: Insertion into 2-4 Tree Sequence of keys: {8,12,1,15,2,14,3,10,5,6,4,9,16,21,7,17} Order of tree, m=...
Q: (C PROGRAMMING ONLY) Do not edit the main() code. 5. My Sincere Apologies by CodeChum Admin Okay,...
A: Step 1 : Start Step 2 : Declare the function sendApology() which accepts a character and an integer ...
Q: Q-1. What is at put gf thie logic gatu? F=?
A: AND gate: OR gate:
Q: tly is the issue with NRZ? And, more importa
A: Below the exactly is the issue with NRZ
Q: Explain the quote: "DESIGN IS INTELLIGENCE MADE VISIBLE"
A: Artificial Intelligence: The artificial intelligence is an ability of a digital computer to perform...
Q: When should you use Power Pivot? When you want to clean, shape and transform data When you need to c...
A:
Q: When we connect to the internet, we go from one LAN technology to another. How should the TCP/IP pro...
A: Introduction: LAN stands for - Local Area Network, and it is made up of a collection of computers th...
Q: In Java, a linked list always terminates with a node that is null
A: Each node has a single next element that moves the list forward, and all nodes have list element dat...
Q: The user decides whether 1. Trapezoid, 2. Ellipse, or 3. Equilateral Triangle. Compute the area of t...
A: The Code is given below.
Q: Describe one design heuristic that facilitates the provision of feedback to users. Provide an exampl...
A: Introduction: A heuristic, or heuristic methodology, is an approach to problem-solving that uses a p...
Q: hello i have a maze and im trying to find a paths in this maze. i want to create a stack and also wa...
A: First, we need to define the four directions. We can define this in terms of coordinates. These coor...
Q: 1. Suppose Host A wants to send a large file to Host B. The path from Host A to Host B has three lin...
A: Here i have prepared written solution as follows:
Q: A ___ set is a set of data used to discover potentially predictive relationships.
A: In this question we have to fill the blank with the provided sentence. This question is related to ...
Q: 8. Determine the twos' complement for decimal 94. Provide 10 answer in binary in a WORD size memory ...
A: Given decimal number is (94)10
Q: In what ways does object-oriented programming differ from other programming styles
A: Object-oriented programming (or OOP) is a programming worldview, or way of programming. It adopts a ...
Q: Given the following binary number in 32-bit (single precision) IEEE-754 format, the decimal value cl...
A:
Q: Construct a forward and a backward table from the following table:
A: Forward Table: x y Δy Δ2y Δ3y Δ4y 2 4.31 0.349 4 3.961 2.618 ...
Q: The Word template is used for recording the measurements. Select one: O True O False
A: A Template Group is used for serving a container for multiple Measurement Location Templates and Che...
Q: What exactly is ransomware?
A: Introduction: A computer virus is a harmful piece of computer code meant to slow down computers, cau...
Q: Write a program in C++ to manage a bank using class?
A: #include <iostream>using namespace std; // classclass Bank {private: int acno; char name...
Q: How technologies can be replaced and passed on from individual to individual
A: Lets see the solution.
Q: What are the differences between how RapidMiner (RM) and Tableau execute k-means clustering?
A: When you have unlabeled data, K-means clustering would be a type of unsupervised learning. The prima...
Q: Describe three major qualities of cloud computing that can be used to improve the efficiency with wh...
A: Introduction: Characteristics include the following: Cloud Computing: Cloud computing uses the Inte...
Q: The text shown in the Validation Text property box when a validation rule is broken is displayed in ...
A: INTRODUCTION: VALIDATION TEXT: Validation text is a customized message that appears when invalid dat...
Q: telecommunication / network You have 2 ground nodes connecting with one of Elan Musk’s starlink sat...
A: Given Data : Distance = 150 Mile Data Rate = 50 Mbps
Q: Why do you want to join CGI company?
A: We support the IT backbones of clients in critical sectors like health and government. Working for C...
Q: Explain the usefulness and limitations of traffic engineering as a solution for the problem of netwo...
A: Introduction: Traffic engineering is a method for boosting the presence of a broadcast communication...
Q: What are some of the many types of malware and what is their impact?
A: The Answer is given below step.
Q: USE PYTHON (GOOGLE COLLABORATORY IS POSSIBLE) Using variables and input functions, make a slambook ...
A: I give the code in Python along with output and code screenshot
Q: Write the appropriate commands that correspond to the following: 1) Create a directory called "OS-LA...
A: in the following section we will solve the above problem in details
Q: A disk stores 512 bytes per sectors, 13 sectors per track, 55 tracks per side and has 2 sides. What ...
A: Given a disk is having 2 sides Each side is having 55 tracks Each track is having 13 sectors Each se...
Thirukkural is a popular literary work in Tamil. It consists of 1330 verses, each verse having 2 lines. These verses are grouped into 133 chapters, each chapter having 10 verses. Suppose these verses are written in a text file consisting of 2660 lines. Give a line number from 1 to 2660, you must find the chapter number (1 to 133), verse number (1 to 10) and the line number ( 1 or 2 ). Write a
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- 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 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…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 the scores from numbers.txt a line at a time and displays their total and average. Since you don’t know how many scores, you will need to keep looping until readline is blank. numbers.txt is a file that contains a list of scores. numbers.txt 10 25 36 45 89 42 54 create a program that reads the scores from numbers.txt file one line at a time. The program should display their total and average. since the number of scores is unknown, the program must keep looping until readline is blank. Please write as simple as possible and use good variables. Thank you. Sample Output: There are 7 scores The total is 301 The average is 43.0Write a program that reads the scores from numbers.txt a line at a time and displays their total and average. Since you don’t know how many scores, you will need to keep looping until readline is blank. num.txt is a file that contains a list of scores. num.txt 10 25 36 45 89 42 54 create a program that reads the scores from num.txt file one line at a time. The program should display their total and average. since the number of scores is unknown, the program must keep looping until readline is blank. Sample Output: There are 7 scores The total is 301 The average is 43.0Write a program that receives a coded message file(Lab3ExtraCreditCT.txt) from your local espionage agent and decodes it into a file using standard English. The problem is your agent forgot to tell you the key used to decode the message. Fortunately, this is a simple substitution code consistently using 1 alphanumeric character to represent another, this is case sensitive. All other characters are not substituted, so a space will always be a space, a – will always be a –, a @ will always be a @, etcetera. You may use the following table to help you, it contains the most common letters used in the English language in descending order. E A R I O T N S L C U D P M H G B F Y W K V X Z J Q 0 5 3 2 4 6 8 1 9 7 Using the following key to convert plaintext to coded text: Plaintext = Now is the time for all good men to come to the aid of their country. Key = THEQUICKBROWNFXJMPSVLAZYDG The file your program outputs should look like this: Coded Text = Fxz bs vku vbnu ixp tww…
- Write a JAVA 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 StudentInfo.tsv. Assume the number of students is at least 1 and at most 20. Assume also the last names and first names do not contain whitespaces. 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: A: 90 =< x B: 80 =< x < 90 C: 70 =< x < 80 D: 60 =< x < 70 F: x < 60 Compute the average of each exam. Output the last names, first names, exam scores, and letter grades of the…Write a program that reads in from a file a starting month name, anending month name, and then the monthly rainfall for each monthduring that period. As it does this, it should sum the rainfall amountsand then report the total rainfall and average rainfall for the period.For example, the output might look like this:During the months of March–June, the total rainfall was 7.32 inchesand the average monthly rainfall was 1.83 inches.Write a program that reads a text file named as “input.txt” and performs the following operations:1. Write each word in the text file in reverse order to the file named as“output.txt” . (Example: If the text file contains ”Hello World!”, then itshould write to the output file ”olleH dlroW!”)2. Print the number of words.3. Print the number of words starting with a capital letter.4. Print the number of words that contain no characters other than Englishletters.In this challenge you are supposed to:1. Comment every function with a description explaining what it does andhow it does it.2. Research and learn how to read and write into text files by using properlibrary functions in C.In your program, you can assume that1. Both the input file (input.txt) and the output file (output.txt) will beplaced on the same folder as your program’s executable (.exe).2. In the input file, the length of the words will be at most 100.
- Write a python program that prompts the user for their favorite basketball team. It should be able to read the list of teams provided below in a file called favorite_teams.txt and check if their team is in that file. Teams in the file:JazzBullsMavericksSpursIf the team is in the file let the user know that their team is in the list of favorites. If the team is not in the file, add the team to the end of the file. Also, let the user know that their team will be added to the file.Sample Run in File:What is your favorite NBA team? Jazz [Enter]Your team Jazz is in the listFile before and after run: JazzBullsMavericksSpurs Sample Run not in File:What is your favorite NBA team? Pelicans [Enter]Your team Pelicans is not in the list. It will be added.File before run: JazzBullsMavericksSpursFile after run:JazzBullsMavericksSpursPelicansfrom Big Java 6th. Edition. Ch.11 P11.12: the capacitor is represented by the equation v(t) = B(1 - e-t/(RC)) Suppose the parameters of the electric circuit are B = 12 volts, R = 500 Ω, and C = 0.25 μF. Consequently v(t) = 12(1 – e-0.008t) where t has units of μs. Read a file params.txt containing the values for B, R, C, and the starting and ending values for t. Write a file rc.txt of values for the time t and the corresponding capacitor voltage v(t), where t goes from the given starting value to the given ending value in 100 steps. In our example, if t goes from 0 to 1000 μs, the twelfth entry in the output file would be: 110.00 7.02261 Make sure that your program catches the FileNotFoundException that can occur if your input file params.txt cannot be found. Your program should catch this exception, and then prompt the user for a file name again until a valid file is entered. I hbelieve I have everything needed, but I cannot figure out how to write in the…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.