Write a program to calculate the average of four integer score, and find the grade for 7 students. The program should do the following: 1. Read the first, second name and the four score of the 7 student from the file (EWexam.txt), 2. Calculate the average and find the grade of the average by using the if and if else. 3. Save the first, second name, average and the grade for each student in file (E:\grade.txt). (10 columns for the first and second name. 4 columns, precision 2, for the average and grade)
Q: Using a text editor, create a file that contains a list of at least 15 six-digit account numbers.…
A: /File: ValidateCheckDigits.java import java.io.BufferedWriter; import java.io.File; import…
Q: Write a program that prompts the user to input the name of a text file and then outputs the number…
A: Coded using C++.
Q: Create a program to count the word's length distribution of a text file. The program should read in…
A: I have given an answer in step 2.
Q: alen.txt' and display all the palindrome w
A: The given program finds whether the words of the file are palindromes or not, if yes then it should…
Q: Ql: Write a program to calculate the average of four integer score, and find the grade for 7…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: The pressure of a gas changes as the volume and temperature of the gas vary. Write a program that…
A: Files are used to store data permanently in a storage device. In the file handling feature of C++…
Q: Write a program to calculate the average of four integer score, and find the grade for 7 students.…
A: Python Source Code def main(): #set count of grades readFile() #readFile reads text file…
Q: Write a program to read the student total scores from a file, knowing that each student data record…
A: Algorithm: Start the program. Read the data from the file. Calculate average from the file. Find…
Q: Consider the block of code and find the output printed on the screen after the program finishes. The…
A: The given C++ program uses the file operations and its output is described as comments in the next…
Q: Write a program that reads the student information from a comma separated values (csv) file. The…
A: Required:
Q: Use notepad to create a text file with weather information as below. Then write a program to read…
A: This is the weather information txt file:-
Q: sing a text editor, create a file that contains a list of at least 15 six-digit account numbers.…
A: import java.nio.file.*; import java.io.*; public class ValidateCheckDigits { public static…
Q: Do the following: Create a program that takes two filenames from standard input and compares whether…
A: Input filenames from user. Open the two files in read mode. Iterate through the file till EOF is…
Q: Write a program that prompts the user for an input file name, reads all words from the input file,…
A: ALGORITHM:- 1. Take input for file name from user. 2. Read the data from it. 3. Write that data into…
Q: Suppose you are given a text file named "Cars", in which each line of the file contains the model,…
A: Program :
Q: Write a program that opens a file me.txt and write your first name followed by a space followed by…
A: The program has been written in python language.
Q: Write a program that asks the user for the name of a text file. The program should display the last…
A: Lets see the solution.
Q: Write a java program to read from the Keyboard name of the item and its price until the user Enter…
A: Step 1 : Start Step 2 : In the main method , declare the array of strings to store the item names…
Q: Let (money.txt) be a text file that contains amounts of money spent on fast food for a given number…
A: Given data, Let (money.txt) be a text file that contains amounts of money spent on fast food for a…
Q: Write a program for the numbers of 5 degrees in the S.F file, and then calculate the sum of the…
A: Given that write a program for the numbers of 5 degrees in the S.F file, and then calculate the sum…
Q: program that expands on the below program by reading each line in the file, and displays all of the…
A: Explanation: - The code being shared is working fine few modifications are required. The file is…
Q: Write a program that prompts the user for an input file name, reads all words from the input file,…
A: ALGORITHM:- 1. Take input for file name from user. 2. Read the data from it. 3. Write that data into…
Q: Write a program to read the date and average from the temps.txt file. Use a string data type for the…
A: given: a program to read the date and average from the temps.txt file. Use a string data type for…
Q: Using a text editor, create a file that contains a list of at least 15 six-digit account numbers.…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Write a program which reads from a file all digits and prints the largest number which is a multiple…
A: Include header files In main() declare the variables arr, count, largest , n, and line Create a…
Q: Write a program that reads a text file named as "input.txt" and performs the following operations:…
A: The ask is to write a C program to do the following: - read a file named input.txt - read the input…
Q: Write a Python program that calculates the area and the circumference of a circle whose radius is…
A:
Q: Write a computer program that calculates the bullet train’s constant rate of acceleration, given an…
A: Code: import java.io.File;import java.io.FileWriter;import java.io.IOException;import…
Q: Exercise 6 : Given a text file containing numbers. Write a Python program that reads the text file…
A: Algorithm: Open the text file Read the numbers For “i” in “a” Add number to the list Declare…
Q: Write a program that reads a file consisting of students’ test scores in the range 0–200.…
A: Step 1 I am using c++ programming language for to execute this program.
Q: Task 1 Write a python program that reads the first n lines of a text file. Suppose you have a file…
A: Assume that, already there is a with name test.txt is present which is an empty file. So, first in…
Q: Create a program that reads the text file called "data.txt". Column O contains the patient number…
A: NumPy is the python built-in package that has the functions to create an array and multidimensional…
Q: Write a program that reads a file consisting of students’ test scores in the range 0–200. It should…
A: Your program is absolutely correct but there is small wrong in text document. Don't use commas in…
Q: Write a program to read the text file named “location.txt”. Each line of the file represents the…
A: Use an input file stream to read the contents from file location.txt and output file stream to write…
Q: Write a program to read the date and average from the temps.txt file. Use a string data type for the…
A: The output for the above program is given below.
Q: Write a program that calculate the sum and the average of random numbers which are written to a file…
A: (1)First we need to read the number random numbers to be generated (2)Now we generate the random…
Q: For this program, assume you have an input file with several lines of text. Each line has a…
A: Code:- import java.io.*; import java.util.Scanner; public class Main { private static final int…
Q: Write a program that produces a bar chart showing the population growth of Prairieville, a small…
A: Code: #include <iostream>#include <iomanip>#include <fstream>using namespace…
Q: Problem A straight line can be defined by a pair of points pi(x1, yı) and p2(x2, y2). The slope m of…
A: code: from math import inf def getCoordinates(s):#strip and split the line to get the…
Q: Exercise 6: Given a text file containing numbers. Write a Python program that reads the text file…
A: Please Indent the code as shown below :
Q: PP 8.3 Write a program that creates a histogram that allows you to visually inspect the frequency…
A: Answer : CODE: import java.io.*; class Scratch { //main method public static void…
Q: Please complete with Python write a program that reads a file containing text. Read each line and…
A: ALGORITHM:- 1. Take input for the both the filenames from the user. 2. Read line by line the input…
Q: Write a program that removes all the occurrences of a specified string from a text file.For example:…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a C Program which reads the contents of the attached sequential file - customers.txt Print…
A: The anwer is given below:-
Q: Using a sound level meter, the noise emanated from 10 Proton X50 at different frequency levels are…
A: a) Program: #include <iostream>#include <fstream>using namespace std; int…
Q: program that reads 5 integer numbers from a file"integer.txt",and store sum and average in…
A: Program: # python version 3import sysdef main(): # open the file read_file =…
Q: Question 2: write a program that reads a file containing text. Read each line and send it to the…
A: JAVA program: import java.util.Scanner; Import java.util.*; import java.io.FileReader; import…
Q: Write a program that prompts the user to enter the name ofan author and the title of one their…
A: Program: //Import necessary header files import java.io.*; import java.util.Scanner; //Define a…
Q: Write a program to calculate the average of seven integer score, the program should do the…
A: 1.In input.txt file name score1,score2,score3,score4,score5,averagethis table is created.…
Step by step
Solved in 4 steps with 3 images
- Write a program that reads a file consisting of students' test scores in the range 0-200. It should then determine the number of students has scored in each of the following ranges:0-24, 25-49, 50-74, 75-99, 100-124, 125-149, 150-174, and 175-200. Output the score ranges and the number of students. (Run your program with the following input data: 76, 89,150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129,149, 176, 200, 87, 35, 157, 189.)Write a program that reads a file consisting of students’ test scores in the range 0–200. It should then determine the number of students having scores in each of the following ranges:0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200.Output the score ranges and the number of students. (Run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189 #include <iostream> #include <fstream> #include <string> using namespace std; int main() { int scores; int i [8] = { 0 }; ifstream infile("Ch8_Ex4Data.txt"); if ("Ch8_Ex4Data.txt") { while (infile >> scores) { if (scores >= 0 && scores <= 24) i[0]++; if (scores >= 25 && scores <= 49) i[1]++; if (scores >= 50 && scores <= 74) i[2]++; if (scores >= 75 && scores <= 99)…Write a program that reads a file consisting of students’ test scores in the range 0–200. It should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. Output the score ranges and the number of students. (Run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189 The file its coming from is called Ch8_Ex4Data.txt Programming C++
- Write a program that reads a student's name followed by five test scores. The program should output the student's name, the five test scores, and the average test score. Output the average test score with two decimal places. The data to be read is stored in a file called test.txt. The output should be stored in a file called testavg.txt. test.txt: A file containing the student names and the five test scores for every student. Andrew Miller 87.50 89 65.75 37 98.50 Green Sheila 91.05 75.88 50.0 65.5 74.30 Sethi Amit 49.82 75 30 74 86.30 testavg.txt: A file containing the student name, the five test scores, and the average of the five test scores for each student.Write a program to read the date and average from the temps.txt file. Use a string data type for the date and a double for the average. The program should then convert the average (Fahrenheit) to Celsius. The conversion formula is subtract 32 from the average (Fahrenheit) and then multiply by five and divide by nine, e.g., (average –32) * 5 / 9. Output the date, the average temperature (Fahrenheit) and the Celsius temperature to a file named celsius.txt. Use the manipulators you have learned about in this chapter to format the output as shown in the sample below and print each number value to one decimal space. 1. Identify the following parameters to complete the specification above. Input parameters? Output parameters? Constant parameters? 2. Attach the input and output of a successful execution of your program below (Hint:Use the snipping tool to take screenshots):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 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 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.Write a program that reads data from a file containing integers that ends with -999. Output the numbers that are divisible by 7 Output the numbers that are divisible by 11 Output the numbers that are not divisible by 7 or 11
- Write a program to calculate the average of seven integer score, the program should do thefollowing:|. Read the full name and the five score of the student from file (D:\istudent’\score txt),2. Save the name of student and five score in file (D:\istudenti.average.txt), (note: the print as atable, the columns:20 for name. 5 for each score.3. Calculate and save in the file the average of scores (10 columns and precision 3 decimalpoints) and fill the white space in average columns in ‘@’Create a program that calculates the average test scores. Given the student’s name and five test scores, calculate the test scores. The student’s name, five test scores and the average test score is stored in the file testaverage.txt. The data is input from the file test.txt. Sample Run Input file (Contents of the file test.txt) Andrew Miller 87.50 89 65.75 37 98.5 Output file (Contents of the testaverage.txt) Student Name: Andrew Miller Test Scores: 87.50 89.00 65.75 37.00 98.50 Average test score: 75.75Write 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…