A program to read data from an input file. The first value read is the number of numbers to be read next. Calculate the average of those numbers and display on screen and write to an output file the numbers read and the average of each group of numbers.
Q: The function f{x) = e* can be represented in a Taylor series by: 2 xll n n=0 e* = Write a program in…
A: NOTE: I am using MATLAB to create this function as the programming language is not mentioned. The…
Q: .. Write a CPP program that reads a line consists of an unknown number of words. The program then…
A:
Q: Write a program that finds the number of times a specific word appears in a text file. The program…
A: we have to write c++ programme for this.
Q: create the program to read the lines of the file, split each line into words, count the words and…
A: The required function to count number of words and skip any numbers that are in the file and strip…
Q: Write a Program that reads integers from a file called "input.dat" (Figure 1) that contains unknown…
A: As no programming language is mentioned, it is solved using basic C++
Q: Write a program that reads the student information from a comma separated values (csv) file. The…
A: Required:
Q: he teacher at a school needs help grading an exam with a number of True/False questions. The…
A: Required: The student’s ID is ABC54102, answer to question 1 is True, the answer to question 3 is…
Q: Write a program that finds the number of times a specific word appears in a text file. The program…
A: Code: #include <iostream>#include <fstream>#include <algorithm>using namespace…
Q: • Write a program that computes and prints the average of the numbers in a text file. • You should…
A: Define the main function which will include the following things prompt user for input of text…
Q: Write a program that inputs a text file. The program should print the unique words in the file in…
A: NOTE : As the question is not specific about the programming language to be used to write the code ,…
Q: Assume that a file containing a series of integers is named numbers.txt . Write a program that…
A: GIven: Assume that a file containing a series of integers is named numbers.txt . Write a program…
Q: In this and the following two exercises (8.10 and 8.11), you will carry out some simple processing…
A: PROGRAM: #Declaring variables data=[] weight_sum=0 height_sum=0 count=0 #Opening input file…
Q: In this exercise, you will build a program to process files containing paragraphs. The aim of the…
A: filename = 'input('Enter file name: ')' punc =…
Q: How do I write a python program that creates a text file to store scoring stats for the Tampa Bay…
A: Declare and initialize 3 arrays for holding names, goals, and assists of all the players. names =…
Q: WHATS THE ALGORITHIM FOR THIS The course records are shown below: Each student has 4…
A: Introduction: WHAT IS THE ALGORITHM FOR THIS The course records are shown below: Each student has…
Q: Write a program that enters data of 10 bank accounts and write on a file Account.txt file. Account…
A: CODE : #include<stdio.h> #include<string.h> //Structure for Bank Account struct…
Q: Using Java, Write a program that reads an input file and writes an output file inserted using…
A: Here I written Java Code with File I/O for given problem below. I hope you like it.
Q: Exercise: Suppose you are given a tcxt file "studcnts.txt" that contains the data of students. very…
A: Please go through all the notes. Notes: 1) There were no restriction stated hence I have made this…
Q: Write a program that finds the number of times a specific word appears in a text file. The program…
A: The complete C++ code is given below with Output screenshots F1.txt file is used for the code…
Q: Exercise 2 Write a Program that reads integers from a file called "input.dat" (Figure 1) that…
A: Provided the Python program with appropriate comments and as per requirements given in above…
Q: m that reads real numbers from a data file named "numbers.txt", one-by-one. For each number, the…
A: numbers.txt 1.5 6.2 96.3-6-399.6 3.2 3.6
Q: An M-File file is a type (Script) that contains a program that calculates the size and external…
A: The asked m-file code in Matlab is provided in the next step using input and fprintf commands or…
Q: ank with an initial amount. The account number, name, and balance of the customer are generated.…
A: A customer opens an account at a bank with an initial amount. The account number, name, and…
Q: Write a program to help a local stock trading company automate its systems. The company invests only…
A: Actually program is a executable software that runs on a computer.
Q: Using Python A file named data.txt contains an unknown number of lines, each consisting of a single…
A: The answer is as follows
Q: If this pyramid has a 2 meters high secret room, then the total number of stones needed is 56 – 4 =…
A: Here is the C++ Program: #include<bits/stdc++.h>using namespace std;int main(){…
Q: A program that will read line of a stream of integers from a FILE. Reverse each number and compute…
A: SUMMARY: -Hence, we got the output.
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 to read in numbers, round them and then total their value. Input will be from a data…
A: The C++ code is given below with output screenshots Contents of the file is also given for your…
Q: The Payroll Department keeps a list of employee information for each pay period in a text file. The…
A: we have given a "data.txt" file in which each line contains- first field: Name second field: Hours…
Q: Write a program to compute Letter grades for a course. The course records are in a file that will…
A: Step 1 : Start Step 2 : Take user input for the grading system for the Scores of the students. Step…
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 finds the number of times a specific word appears in a text file. The program…
A: #include <iostream>#include <fstream>using namespace std;bool iequals(const string&…
Q: The Payroll Department keeps a list of employee information for each pay period in a text file. The…
A: The steps needed to be followed for this program are: Take file name as input from the user. read…
Q: a random text file given as input in Python however, each line that you read and read transfers from…
A: # provide input file with text# read input file ip.txt in read modewith open("ip.txt", "r") as file:…
Q: Exercise 2 Write a Program that reads integers from a file called "input.dat" (Figure 1) that…
A:
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: Suppose you are given a text file that contains the names of people. Every name in the file consists…
A: Program Approach: Import necessary packages for reading files and writing files ,collections .…
Q: In Python A single output file named myoutput.txt is provided that is initially empty. Description…
A: Objective: This program reads an input file and checks if the lines are palindrome. The output for…
Q: C++ Write a program to read data from an input file. The first value read is the number of numbers…
A: //all include files#include<iostream>#include<fstream>#include<string> //using…
Q: Write a C++ program that prompts the user to enter a file name that contains the scores of students…
A: Note: We are authorized to answer one question at a time, since you have mentioned 1, 2, and 3…
Q: 2. Given the following data file section9.2.2.input: (one value per line) • 10 20 250 25 50 75 40…
A: We need to write a script that reads a file containing numbers in each line and we need to show the…
Q: Write a program to count occurrences of a character in a file Character to be input from the…
A: #include<iostream>#include<fstream>#include<string>using namespace std;int main(){…
Q: Write a program that asks for the name of an input file. Then, read all the numbers in the file, and…
A: Create a PYTHON3 file in which import io module and validate file in program.Print sum, number of…
Q: Create a program to count the word's length distribution of a text file. The program should read in…
A: Below i have coded:
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: An M-File file is a type (Script) that contains a program that calculates the size and external…
A: The required Matlab (m-file) code is given in the next step by using input and fprintf commands for…
Q: Create a program to count the word's length distribution of a text file. The program should read in…
A: Below i have given program:
Q: Given a set of text files containing synonyms for different words, complete the main program to…
A: d={} #predifined dictionary with empty values filename = input()# filename which we want to…
Q: Write a C program Write a program that will write the integer values from 1 to 100, one integer per…
A: To write a program that will write the integer values from 1 to 100, one integer per line, onto a…
A
input file:
4 12 14 99 83 5 2 9 56 4 3 2 13 15 1 6 8 32 12 3 4 5 12 34 45 0
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Write a program that prompts the user to enter the name ofan author and the title of one their books. It writes the author’s name to a file.Their book’s titleis written at the end of a file Books.txt with the line number of the author’sname in Authors.txt inserted before the title. Assume that the title is notalready stored in Books.txt and the author name is already in Authors.txt.Write a program to help a local stock trading company automate its systems. The company invests only in the stock market. At the end of each trading day, the company would like to generate and post the listing of its stocks so investors can see how their holdings performed that day. Assume the company invests in 10 different stocks. The desierd output is to produce two listings, one sorted by stock symbol and another sorted by percent gain from highest to lowest. The input data is provided in a file in the following format: symbol openingPrice closingPrice todayHigh todayLow prevClose volume. For example, the sample data is: MSMT 112.50 115.75 116.50 111.75 113.50 6723823 CBA 67.50 75.50 78.75 67.50 65.75 378233Write a program to count occurrences of a character in a file Character to be input from the keyboard. Result to be displayed on the monitor. Program only works if no more than 9 occurrences are found. Here is the data I used for the screen print attached .ORIG x4000 .FILL x57 ;W.FILL x69 ;i.FILL x6c ;l.FILL x6c ;l.FILL x69 ;i.FILL x61 ;a.FILL x6d ;m.FILL x20 ; space.FILL x54 ;T.FILL x2e ;..FILL x20 ; space.FILL x4d ;M.FILL x69 ;i.FILL x6e ;n.FILL x6b ;k.FILL x04 ;EOTTRAP x25.END
- WHATS THE ALGORITHIM FOR THIS The course records are shown below: Each student has 4 assignments. 108194 9 10 10 10 197526 10 10 10 10 197008 10 10 0 10 197746 10 10 9 10 108154 10 0 10 9 Create an input file ‘CSassignments.txt’ using an editor such as Notepad++ with a student number, then a space, then four assignment marks on one line. The assignment marks are whole numbers and are separated by a space. Your C++ program will read from the file ‘CSassignments.txt’ and write to a second file ‘CSgrades.txt’ which includes the average of the student’s four assignments. e.g. 108194 9 10 10 10 9.75 Your C++ program should work with any number of records in the ‘CSassignments.txt’ input file – that is –…Write a program to read a text file line by line and display each word separatedby '#'.Write a program that inputs a filename from the user and prints to the terminal a report of the wages paid to the employees for the given period. The report should be in tabular format with the appropriate header. Each line should contain an employee’s name, the hours worked, and the wages paid for that period. The wages paid are equal to the hourly wage * hours worked + tips. Use the sample data using python: Berg 7.25 32 110.75 Turner 8.00 40 0 Roman 10.0 50 0 Pugh 7.25 32 22.75 Potter 8.75 20 0 Savage 9.50 40 55.0
- for python: write a program that ask user for name the name of a file. the program should display the contexts of the file with each line preceded with a line number followed by a colon. the line numbering should start at 1.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.75Create a program that accepts 10 positive or negative integers then in a text file prints the integers in the order they were entered, ascending, and descending order. Additionally, the average, the highest, the lowest of all inputs is also shown and printed.
- Instructions(C++) 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, 189Write 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.Python: How do I format a number so that I get exactly 5 digits and then pad zeros after? I want to also round. I am reading a file and then writing those contents to another file. Original file: 1234.3092 1234.0 8912.32 I want just 6 digits so the new file should read 1234.31 1234.00 8912.32