Consider a square region in the first quadrant of the Cartesian plane whose bottom left and upper right corners have coordinates (0,0) and (100,100), respectively. A text file contains a sequence of rectangles, one per line, with sides parallel to the Cartesian axes. Each rectangle is identified by the x and y coordinates of the bottom left and upper right corners, reported with spaces as separators. The coordinates are integers between 0 and 100, with extremes included. Write a function:
Q: Write a program that allows the user to create and maintain a list of contacts in a file named…
A: Answer: I have done code in C++ . and also I have attached code as well as code screenshot.
Q: Write a program that allows the user to create and maintain a list of contacts in a file named…
A: Actually, program is an executable software that runs on a computer.
Q: You are a cyber investigator, your task is to write a python program that can read file signatures…
A: Here we write python program to read file and store signature in list:…
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: import csv# to store wordswords= []# openfilewith open('input1.csv') as f: for row in…
Q: xt file of names, (3 names per line, 5 lines in total) followed by an age for each name. Go through…
A: input.txt Smith 25 kevin 65 Hank 54Tom 98 Ben 96 Denver 63John 52 Gandia 63 Tokeyo 29Lebaon 36…
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: Given code: #Header file import csv #Getting the input file file = input() #Initializing frequency…
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: Here, Code instruction is given.
Q: Muscat marketing research company is conducting a rating survey of different chains of supermarkets.…
A: the code is an given below :
Q: Write a Python program that reads each line of an input file temperatures.txt that consists of a…
A: Algorithm : Step 1 : opening the file temperature.txt in read mode and tempSummary.txt in write…
Q: Create a Python program that reads a text file containing 10 mailing addresses. The text file of…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.
Q: Create a program: Given a large text file with multiple strings, what would be the most…
A:
Q: In Python Take the Deck of cards we created in Problem Solving Exercise: Shuffle and Deal Cards and…
A: Note: we had provided answer according to given hints provided in solution parts.
Q: Suppose you are given a text file named "Results.txt", in which each line contains a course code,…
A: Here I have read the content of the file and stored it into a list. Next, I have iterated over the…
Q: Assume that you will be given a *.txt file, which in the same format of RandSource.txt(attached).…
A: A C++ program to generate random numbers between given range is provided below;//Declare necessary…
Q: Write a program that reads a text file named as "input.txt" and performs the following operations:…
A: /* C program that write each word in a text file in a reverse order and performs all the given…
Q: The example of the two CSV files is attached below. One of the file is the crime database and the…
A: The program is written in python The sample files created are:
Q: Write a program that reads in two hexadecimal numbers from a file, hex.txt, and prints out the sum…
A: Here, I'm writing C++ code:- #include<iostream>#include <fstream>using namespace…
Q: In this assignment, you will create a Java program to read undergraduate and graduate students from…
A: Code:- StudentIDComparator.java import java.util.ArrayList;import java.util.Collections;import…
Q: Write a program that removes all the occurrences of a specified string from a text file. For…
A: This program is done with java file operations. So initially reading the file arguments from the…
Q: Write a program to read the names in BoyNames.txt and GirNames.txt. Find the names that appear in…
A: Solution - Programming language name- Python All solution steps are included in program code. Store…
Q: We have a text data file with 9 records. Each record has a name, a midterm score, and a final exam…
A: Create Your .CSV file in The same Folder as your Code . Avoid Indentation Error. Hope This will Help…
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: Create a test file with a paragraph containing more than 20 lowered sentences. Read the filr,…
A: Note: Since no programming language is mentioned. I am attempting this in python. if you need it…
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: According to the Question below the solution: Output:
Q: Create a program that reads a text file containing a 15 x 15 grid which represents a block of human…
A: Java Source Code: import java.util.ArrayList;import java.io.FileReader;import…
Q: Write a program that reads in two hexadecimal numbers from a file, hex.txt, and prints out the sum…
A: #include<iostream>#include <fstream>using namespace std;bool…
Q: Write a program that first reads in the name of an input file, followed by two strings representing…
A: EXPLANATION: Create a text file txt that contains the given strings (alphabetically arranged).…
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: CODE:- import csv n = input()with open(n, 'r') as myfile: Reader = csv.reader(myfile,…
Q: Consider we have loaded our data frame, named NBA, using the data in the file below. Write a single…
A: Pandas Index.unique() function return unique values in the index. Uniques are returned in order of…
Q: Write an application that removes extra spaces from a text file. In the days of the typewriter, it…
A: The code in Java is : import java.io.BufferedReader; import java.io.FileNotFoundException; import…
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: Programming instructions: Import necessary header files. Take the file name from the user.…
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: Write a program that prompts the user for an input file name, reads all words from the input file,…
A: Create a objects of input and output file. Then read input file name Then open input file using…
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 program that creates the file "LetterGrades.txt" filled with 1000 randomly generated letter…
A: import random def main(): #create variable for file name fileName = 'LetterGrades.txt'…
Q: Write a program that allows the user to create and maintain a list of contacts in a file named…
A: Actually, program is an executable software that runs on a computer.
Q: Write a program that reads in two hexadecimal numbers from a file, hex.txt, and prints out the sum…
A: //USAGE hexdump.py [filename] import sys import os.path def check_file_provided(): # This method…
Q: In R, there is a data set called mtcars which has engine cylinders, miles per gallon, horsepower,…
A: We have to use mtcars data to provide solution of all the question given
Q: Write a program that will read names, ids, dept names, and cgpa of some students from a file and…
A:
Q: here is a text file containing the details of several invoices details. Each invoice uses 3 lines of…
A: Please upvote. I am providing you the correct answer below. Please please please.
Q: Write a program that reads in two hexadecimal numbers from a file, hex.txt, and prints out the sum…
A:
Q: Write a Python function ‘AVGCSV’ that reads a .csv file that includes ‘n’ rows and ‘m’ columns, it…
A: Answer :-
Q: Muscat marketing research company is conducting a rating survey of different chains of supermarketS.…
A: In this question we have to perform the following task using file handling in C++. What and when to…
Q: Write a program that reads in from a file a starting month name, an ending month name, and then the…
A: GIVEN:
Q: Write a program that reads in two hexadecimal numbers from a file, hex.txt, and prints out the sum…
A: Given data is shown below:
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: Open the specified file Then, read row by row and check for each word
Q: Suppose you have a file Monster.txt that lists the Monster Energy Drinks the company offers, on one…
A: Code: #include <iostream>#include <fstream>#include <string.h>#include…
Q: Write a program that first reads in the name of an input file and then reads the file using the…
A: Initially make Sure to save the file before executing as shown below: Executable Code: import csv #…
Step by step
Solved in 2 steps
- here is a text file containing the details of several invoices details. Each invoice uses 3 lines of the file. The first of the three lines is a string giving the date of the invoice, for example “1/5/2021” or “2/6/2021”. The second of the three lines contains double giving the amount, the third line is boolean indicating whether it is paid or not. However, the very first line of the file is an integer number, which says how many invoices are given in the file in the lines which follow it (i.e. how many records will follow). Text file example for two vehicles “invoices.txt” 2 1/5/2021 50.0 true 2/6/2021 20.0 false Write code for a method named processTextFile() which will open the file named ‘invoices.txt’, from which it will read the data of invoices. It will create Invoice objects using this data by calling the constructor that takes the parameters (date, amount, paid) , placing them into an ArrayList invoiceList.In Python Write a program that reads movie data from a CSV (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the CSV file and outputs the contents according to the following requirements: Each row contains the title, rating, and all showtimes of a unique movie. A space is placed before and after each vertical separator ('|') in each row. Column 1 displays the movie titles and is left justified with a minimum of 44 characters. If the movie title has more than 44 characters, output the first 44 characters only. Column 2 displays the movie ratings and is right justified with a minimum of 5 characters. Column 3 displays all the showtimes of the same movie, separated by a space. Each row of the CSV file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows. Ex: If the input of the program is: movies.csv and the contents…The Dodgers recently won the World Series vs the Tampa Bay Rays. Attached are two files: Teams.txt - This file contains a list of serveral Major League baseball teams in alphabetical order. Each team is listed in the file has won the World Series at least once. WorldSeries Winners.txt - This file contains a chronological list of the World Series' winning teams from 1903-2020. (The first line of the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2020. Note the World Series was not played in 1904 or 1994.) Write a program that displays the contents of the Teams.txt file on the screen and prompts the user to enter the name of one of the teams. The program should then display the number of times that team has won the World Series in the time period from 1903 to 2020. In the program, 2 arrays are needed: TeamList array and Winners array. TeamList array will contain the entries in Teams.txt. Winners array will contain the entries…
- There is a csv file called Air_Quality.csv. It has 12 columns and 17,000 rows. One column titled 'Name' which has a various emissions listed in it. Another column titled 'Geo Place Name' has a list of cities. Write a code (in the most basic Python) which finds an emission called Traffic Density within the column and prints out which city has the most Traffic Density based on a column called 'Data Value' Below is a picture of a small chunk of the csv file.In this project, you will develop algorithms that find road routes through the bridges to travel between islands. The input is a text file containing data about the given map. Each file begins with the number of rows and columns in the map considered as maximum latitudes and maximum longitudes respectively on the map. The character "X" in the file represents the water that means if a cell contains "X" then the traveler is not allowed to occupy that cell as this car is not drivable on water. The character "0" in the file represents the road connected island. That means if a cell contains "0" then the traveler is allowed to occupy that cell as this car can drive on roads. The traveler starts at the island located at latitude = 0 and longitude = 0 (i.e., (0,0)) in the upper left corner, and the goal is to drive to the island located at (MaxLattitude-1, MaxLongitudes-1) in the lower right corner. A legal move from an island is to move left, right, up, or down to an immediately adjacent…The Dodgers recently won the World Series vs the Tampa Bay Rays. Attached are two files: Teams.txt - This file contains a list of serveral Major League baseball teams in alphabetical order. Each team is listed in the file has won the World Series at least once. WorldSeries Winners.txt - This file contains a chronological list of the World Series' winning teams from 1903-2020. (The first line of the file is the name of the team that won in 1903, and the last line is the name of the team that won in 2020. Note the World Series was not played in 1904 or 1994.) Write a program that displays the contents of the Teams.txt file on the screen and prompts the user to enter the name of one of the teams. The program should then display the number of times that team has won the World Series in the time period from 1903 to 2020. In the program, 2 arrays are needed: TeamList array and Winners array. TeamList array will contain the entries in Teams.txt. Winners array will contain the entries…
- In this project, you will develop algorithms that find road routes through the bridges to travel between islands. The input is a text file containing data about the given map. Each file begins with the number of rows and columns in the map considered as maximum latitudes and maximum longitudes respectively on the map. The character "X" in the file represents the water that means if a cell contains "X" then the traveler is not allowed to occupy that cell as this car is not drivable on water. The character "0" in the file represents the road connected island. That means if a cell contains "0" then the traveler is allowed to occupy that cell as this car can drive on roads. The traveler starts at the island located at latitude = 0 and longitude = 0 (i.e., (0,0)) in the upper left corner, and the goal is to drive to the island located at (MaxLattitude-1, MaxLongitudes-1) in the lower right corner. A legal move from an island is to move left, right, up, or down to an immediately adjacent…In Python Prompt the user for a text file that contains a list of student names, one on each line. Also prompt the user for a CSV file that contains scores for the students in the following order: homework1, homework2, midterm exam, final exam. Each line in the CSV has four scores, delimited by a comma. Each name in the text file has the corresponding scores in the CSV file. You will need to calculate the weighted final grade for each student as follows: 5% homework1 5% homework2 40% midterm exam 50% final exam Homework is scored out of 10 points and exams are scored out of 100 points. You need to create a program that will read the scores from the CSV file, calculate the weighted final grade, and display the resulting final grade, along with the student's name. Sample input files are attached. You can assume that the same number of lines will be in the input files, and that the order of the names and corresponding grades is the same in the two files. Display the name and final grade…In Python: The Broadway dataset contains data for Broadway shows' Capacity (percentage of the theatre filled) and Gross Potential (maximum amount that can be earned) for multiple shows in a specific month and year. Given a CSV file name read from user input, write a program that performs the following tasks: Read in the CSV file as a dataframe. Insert a new column labelled "Size" at the end of the dataframe. The "Size" column contains values in column "Gross Potential" divided by 2. Output the dataframe using the print() function. Create a scatter plot of "Gross Potential" vs "Capacity" with the following marker styling parameters: markers: 'x' color: orange size: values in column "Size" Add the x-label ("Capacity", fontsize = 10), y-label ("Gross Potential", fontsize = 10), and title ("Gross Potential vs Capacity", fontsize = 16) to the figure. Add gridlines to the figure using '--' as linestyle. Save the figure as output_fig.png. Click here to view Input and Output Example
- There is a csv file called Air_Quality.csv. It has 12 columns and 17,000 rows. One column titled 'Name' which has a various emissions listed in it. Another column titled 'Geo Place Name' has a list of cities. Write a code (in the most basic Python) which finds the two emissions called PM2.5-Attributable Respiratory Hospitalizations (Adults 20 Yrs and Older) and PM2.5-Attributable Respiratory Hospitalizations (Adults 40 Yrs and Older)within the column and prints out which city has the respiratory hospitalizations for both 20 years and older and 40 years and older based on a column called 'Data Value' Below is a picture of a small chunk of the csv file.Create a .txt file with 3 rows of various movies data of your choice in the following table format: Movie ID number of viewers rating release year Movie name 0000012211 174 8.4 2017 "Star Wars: The Last Jedi" 0000122110 369 7.9 2017 "Thor: Ragnarok" Create a class Movie which instantiates variables corresponds to the table columns. Implement getters, setters, constructors and toString. ----Important 1. Implement two search methods to search Movies by their rating from unsorted array and by year (first) and a rating (second) from unsorted List. Test your methods and explain their time complexity.The names and student numbers of students are save in a text file called stnumbers.txt. Example of the content of the text file: Peterson 20570856 Johnson 12345678 Suku 87654321 Westley 12345678 Venter 87654321 Mokoena 79012400 Makubela 29813360 Botha 30489059 Bradley 30350069 Manana 30530679 Shabalala 28863496 Smith 87873909 Nilsson 30989698 Makwela 30256607 Govender 30048117 Ntumba 30598303 Ramsamy 29952239 Skosana 29982995 Jameson 30228484 Xulu 29092248 Wasserman 27469352 Bester 28615425 Babane 27154033 Maboya 29897890 Mahlangu 30031338 Majavu 30165970 Myene 30954177 Motaung 30907276 Ramaroka 30804507 Radebe 30007674 Sekake 30017416 Zwane 30038227 Shuro 30238072 Viljoen 28881389 Sithole 45688555 Write a function called displayData() to receive the array and number of elements as parameters and display the names and student numbers of the students with a heading and neatly spaced. Write a function, isValid(), which receives a number as parameter and determines whether the number…