You have a program that outputs the message “illegal input record” when fed a certain file of input records you know the processing of each record is independent of other records you want to discover what record is illegal
Q: Write a program in Python that serves as a password checker. The string password that Python should…
A: Here I have declared the target string and a boolean variable to keep a record that the user enters…
Q: Wnte a Java program that allows the user to specify a file name on the command line and prints the…
A: The filename is first read from the command prompt arguments. If filename not entered it is prompted…
Q: This is a debugging question - The files provided in the code editor to the right contain syntax…
A: Actually, debugging is identify and rectify the errors.
Q: This question concerns the use of a book cypher to encode a message. Write a program called…
A: A Python program is as follows, File name: “bookcypher.py” def main(): #Get input file name…
Q: Write a program that opens the file, reads all the numbers from the file, and calculates the…
A: Program description : The c++ program, main.CPP opens an input file, Random.txt .The program will…
Q: I have a bit of code that is intended to read a file ("students.txt") and calculate the average,…
A: I have written the complete code for you with helpful comments. But remember, this code assumes that…
Q: Implement a system of three concurrent processes which read and write sequence numbers to a file.…
A: The code sequence may lead to duplication of integer values when processes are run concurrently…
Q: Write a Java program to read the data from the text file through InputStream class. Sample testcases…
A: abstract class is the super class of all classes representing an input stream of bytes.
Q: Write a program to process weekly employee time cards for all employees of an organization (the…
A: Answer: C Source Code: #include <stdio.h>#include <stdlib.h> int main(){ //Declare…
Q: Write a C program that gets a source file name from a user. If the file does not exist, it will…
A: Please give positive ratings for my efforts. Thanks. ALGORITHM get the source the source file…
Q: Write Java a program that will record the purchases made at a store. For each purchase, read from…
A: import java.io.FileWriter; import java.util.Scanner; public class Main{ public static void…
Q: consider a program that reads data from a text file called: "klingon-english.txt" (shown below). How…
A: As the programming language is not mentioned here, we are using PYTHONThe code is given below with…
Q: Write a java program. The program asks for an input of the name of a txt file. Then creates a…
A: Code:- import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; public…
Q: File "sampleEntrada.txt" 5 7 11 13 14 15 22 File "example Output.txt" There are 4 palindromic number…
A: def isPalindrome(num): if str(num) == str(num)[::-1]: return True else: return…
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: Write a java program. The program asks for an input of the name of a txt file. Then creates a…
A: Please refer to the following steps for the complete solution to the problem above.
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 that reads a list of grades (separated by comma) for a class (one line per student)…
A: Step 1 : Start Step 2 : Open the InputGrade.txt file in read mode Step 3 : Open the OutputGrade.txt…
Q: Write a program that asks a user to input a file name and then reads the file and produces output.…
A: NOTE - I have used python programming langauge for code. Here I have taken input from the user and…
Q: Write a Java program that reads in a paragraph of text from a file and prompts the user to enter a…
A: I have provided JAVA CODE along with CODE SCREENSHOT , TXT FILE SCREENSHOT , CODE S CREENSHOT…
Q: Suppose a library is processing an input file containing the titles of books in order to identify…
A: Here's a Java program that reads in a file of book titles, identifies the duplicates, and writes…
Q: Write a program that implements the behavior of a cash register. Your program will consist of an…
A: ANSWER:-
Q: A file named ClassData.txt contains records of several students. Each record contains student's name…
A: import java.util.Scanner;import java.io.*; public class Main { static double…
Q: Write a program that will open the file dataFile.csv, read its contents and print them out. Your…
A: import csv file = open("dataFile.csv")obj = csv.reader(file) print("First\tLast \tAge\tWage") for…
Q: Consider a CSV file contains information about COVID-19 status of Bangladesh. The header of this…
A: Solution- Programming Language - Java All necessary comments are included in program code. Store…
Q: There are 45 students in a class, and the averages of these students are kept in a "sequential…
A: First we will check that is file exists or not we will execute two different blocks on the basis of…
Q: I have a bit of code that is intended to read a file ("students.txt") and calculate the average,…
A: Given The answer is given below Description:- The following program is to print the highest…
Q: You are writing an inventory system for a library. This program will allow the user to enter a book,…
A: Initialize an empty dictionary called library to store book titles and stock counts.Enter a…
Q: Write a Python program that reads from each line of an input file called grades.txt, a student id…
A: Python code for Take three subject marks Return average with name or roll number.
Q: Write a program to output instructions on how to solve an n-disk Towers of Hanoi puzzle. The program…
A: given: program to output instructions on how to solve an n-disk Towers of Hanoi puzzle. The program…
Q: Create a C program that do the following : * decrepit and encrypt texts using Caesar cipher with 3…
A: ALGORITHM: Step1: Assign the integer value a and b Step 2: Enter the following option to choode…
Q: 2. Keep only the last three lines of a file and delete others. If there are less than three lines in…
A: Answer
Q: 1. Output reversed words for each lines of a file to another file. Sample Input file Output file…
A: Answer is given below-
Q: The organization wants the program to read data from an input file (input.in). The following data…
A: ANSWER:-
Q: This is a Java program
A: Can you write a Java program that reads integers from a file until it reaches the end of the file…
Q: The result of COM101 exam results are given in Grades.txt. Write a C program that reads student ids…
A: C - program reads an input text file called "Grades.txt" .The input text file contains the student…
Q: Write a Python program that reads each line of an input file workshop.txt that consists of a city…
A: Algorithm: Start Read workshop.txt file data Declare an empty string s Iterate through file content…
Q: Write a program vote.cc that allows to read from a file vote.in the last names of the candidates in…
A: The below functions are implemented in the c++ program. The prototypes of the functions are shown…
Q: Write a java program that reads a file named input.txt and writes a file that contains the same…
A: Required java code along with sample output given below:
Q: There is a file sensor_a.txt that contains the following 15 lines of daily humidity. Write a program…
A: Note that there were no restriction stated hence made this way, please let me know if you have any…
Q: I have a bit of code that is intended to read a file ("students.txt") and calculate the average,…
A: As you are not able to read the file students.txt, here is the source code with little modification…
Q: Write a program that will sequentially list numbers from 0 to 50, changing its color depending on…
A: Step 1 : Start Step 2 : Define a function delay() to print the numbers in an interval of 1 second.…
Q: Write a code that converts temperature given in degree celcius to the temperature in degree…
A: Below is the required code in C language. Program Approach: Include necessary header files to get a…
Q: Create a Windows program that lets users investigate the knapsack problem. The capacity, sizes, and…
A: I choose python as a programming language for this window program. Here we used a loop and if else…
Q: Write a Java program that reads from a URL and searches for a given word in the URL and creates a…
A: In this question we have to write a Java program that reads from a URL and searches for a given word…
Q: Write a program in Python that serves as a password checker. The string password that Python should…
A: ANSWER:
Q 3. You have a program that outputs the message “illegal input record” when fed a certain file of input records you know the processing of each record is independent of other records you want to discover what record is illegal
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the max and average, respectively. Output the max and average with two digits after the decimal point. Ex: If the input is: 14.25 25 0 5.75 the output is: 25.00 11.25 461710 3116374.qx3zqy7 LAB ACTIVITY 6.7.1: LAB: Varied amount of input data 0/10Suppose a library is processing an input file containing the titles of books in order to identify duplicates. Write a program that reads all of the titles from an input file called bookTitles.inp and writes them to an output file called duplicateTitles.out. When complete, the output file should contain all titles that are duplicated in the input file. Note that the duplicate titles should be written once, even though the input file may contain same titles multiple times. If there are not duplicate titles in the input file, the output file should be empty. Create the input file using Notepad or another text editor, with one title per line. Make sure you have a number of duplicates, including some with three or more copies.Write a program that reads student's IDs and exam scores (type int) for a particular exam in a course from each line of an input file (the input file is included). You need to compute the average of these scores and assign grades to each student according to the following regulation: If a student's score is within 10 points (above or below) of the average, assign a grade of satisfactory. If a student's score is more than 10 points above average, the grade will be outstanding. If a student's score is more than 10 points below the average, the grade will be unsatisfactory. The output of your program should consist of a three-column table that shows each ID, score, and corresponding grade. A sample output is shown below. ID SOLS SENTO 0 1 2 3 4 8 9 Score 75 99 66 43 87 65 82 91 84 76 Grade Satisfactory Outstanding Unsatisfactory Unsatisfactory Outstanding Unsatisfactory Satisfactory Outstanding Satisfactory Satisfactory Write necessary functions and put them in a module to process this…
- Write a Python program that• Prompts user to enter a number (in other words, asks user to enter a number)• Reads the number• Checks if the input number is odd or even and prints an appropriate message. A number is evenif it is divisible by 2.• Checks if the input number is divisible by 3 or not and prints an appropriate message.Three employees in a company are up for a special pay increase. You are given a file,SalaryData.txtwith the following data: Miller Andrew 65789.87 5 Green Sheila 75892.56 6 Sethi Amit 74900.50 6.1 Each input line consists of an employee’s last name, first name, current salary, and percent pay increase. For example, in the first input line, the last name of the employee is Miller, the first name is Andrew, the current salary is 65789.87, and the pay increase is 5%. Write a program that reads data from the specified file and stores the output in the file SalaryOut.txt. For each employee, the data must be output in the following form: firstName lasName updatedSalary. Format the output of decimal numbersto two decimal places. C++Write a program that reads student's IDs and exam scores (type int) for a particular exam in a course from each line of an input file (the input file is included). You need to compute the average of these scores and assign grades to each student according to the following regulation: If a student's score is within 10 points (above or below) of the average, assign a grade of satisfactory. If a student's score is more than 10 points above average, the grade will be outstanding. If a student's score is more than 10 points below the average, the grade will be unsatisfactory. The output of your program should consist of a three-column table that shows each ID, score, and corresponding grade. A sample output is shown below. ID 0 ONM45676 0 1 8 9 Score 75 99 66 43 87 65 82 91 84 76 Grade Satisfactory Outstanding Unsatisfactory Unsatisfactory Outstanding Unsatisfactory Satisfactory Outstanding Satisfactory Satisfactory
- Write a program that reads in from a file a starting month name, an ending month name, and then the monthly rainfall for each month during that period. As it does this, it should sum the rainfall amounts and 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 inches and the average monthly rainfall was 1.83 inches. Data for the program can be found in the rainfall.txt file located in the Chapter 5 º programs folder on the book's companion website. Hint: After reading in the month names, you will need to read in rain amounts until the EOF is reached and count how many pieces of rain data you read in.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 sentences.txt. Start a new line whenever a word ends in a period, question mark, or exclamation mark. Also do this if the period, question mark, or exclamation mark is followed by a quotation mark. Otherwise, separate words with spaces. main.cpp in1.txt in2.txt 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int main() 7 { 8 9 10 11 12 13 14 15 } string input file_name; cout > input file_name; /* Your code goes here */ return 0; << endl;Design a modular program in Python to process payroll for all hourly paid employees, save all the data into a text file and make a backup file as well. The program should allow user enter each employee's ID, name, hours worked, and hourly pay rate. And then calculate gross pay with overtime hours(hours beyond 40) paid 50% more. And then the program should display pay statement for each employee and store them into a same text file. The program should display total number of employees, total number of hours worked by all employees, and total gross pay and save them at the end of the same text file as well. The program should contain the following functions: main(), get_employee_info(), calc_gross_pay(hours, rate), display_pay_statement(emp_id, emp_name, hours_horked, hourly_pay_rate, gross_pay), save_pay_statement_to_file(file_object, emp_id, emp_name, hours_worked, hourly_pay_rate, gross_pay), save_summary_to_file(file_object, number_of_employees, total_hours_worked, total_gross_pay).…
- Write a complete java program that: asks the user for a file name tests whether the file exists and tells the user if it does exist asks the user whether it should be deleted. Either delete or do not delete the file based on the user input. If they don't delete, ask them if they would like to write to the file If they want to write, ask what they want to write to the file and write it. Make sure to provide plenty of console output dialog specifying what status/actions are taken at each step.Write a Python program stored in a file q1.py that calculates what day of the week a certain date will be in a given month. The user will first start by entering the first day of the month (i.e. Monday) and then enter a number from 1 to 30. In this problem, we assume that all months have 30 days. The program will output what day the number corresponds to. Users can enter days by the first three letters of the day, the whole name for the day, or the single letter abbreviation (U-Sunday, M-Monday, T-Tuesday, W-Wednesday, R-Thursday, F-Friday, S-Saturday). Example: Enter the first day of the month: M Enter a date: 19 The 19th is a Friday.Find the attached file.