We want to build an address book that is capable of storing name, Birthday & Email & address & phone number of a person. Address book provides functionality in the form of a menu. The feature list includes: • Add – to add a new person record • Delete – to delete an existing person record by name • Search – to search a person record by name .. Sort - to sort the file after adding a new person record. · Exit – to exit from application
Q: Course:Data Structure and Algorithms Kindly do this correct as soon as possible: I am providing…
A: The program is written in java. Added 50 entries . The text file is:
Q: By using the C language, generate a computerized student record consisting of name, matric number…
A: Coded in C language, verify the variable names.
Q: #include #include // includes ifstrram and efstream using namespace std; int main() { int total =…
A: - We need to highlight the use of double slashes in file path and also we need to highlight the…
Q: This is the question I am stuck on - A personal phone directory contains room for first names and…
A: Actually,given NamePhone #Gina(847) 341-0912Marcia(847) 341-2392Rita(847) 354-0654Jennifer(414)…
Q: /** * The file path that is IOManager read and write an object from. This * file location will is…
A: MyIOManager.java file:
Q: Write the first three columns of an fstab entry that will mount the partition ext4 partition…
A: Yоur Linux system's filesystem tаble, аkа fstаb, is а соnfigurаtiоn tаble designed tо…
Q: ABC Bank needs to store the information of all the users. For a user, the information that the bank…
A: Code, Code Screenshot, and Output are given below:
Q: Which of the following items is correct about record structures? I. There are two ways of making…
A: I. There are two ways of making fixed-length records: fixed length fields and variable lengths II.…
Q: How can i sort the names inside of file where there is already data? Thanks #include #include…
A: Sorting is nothing but arranging the data in ascending or descending order. There are many…
Q: 9:\ Deleted text in Word goes to Trash a True O b. False O 10:\ The following option is used to add…
A: We need to choose the right option for the given statements- The questions are as- (1) deleted…
Q: B. Write a single script within the "restore.ps1" file that performs all of the following functions…
A: Actually, program is an executable software that runs on a computer.
Q: DA-4 PHP - Poblems O To porfor m aray and String Functoons Cany 10) e 10 perform a yile upload…
A: Array and String Function in PHP.
Q: Write a function that takes an artist, song, and filename, accesses the lyrics.ovh api to get the…
A: I have worked on the Javascript Function. The program needs to be in such a way that the user inputs…
Q: Can you plaese do these questions for me Our users do not want to have to re-enter the…
A: # Method: Load levelsList using the data in levelsFile # Method: Write levelsList to levelsFile…
Q: 1. Perform the following operations using VI editor: 1). Create a file and write into it. 2). How to…
A: Note- I have hide some details and data of file because it is not allowed as per Our guidelines. use…
Q: # open file to read grades grades - open ('grades.txt', 'r') New to Spyder? Read our tutorial # open…
A: The reason for the error is: The file is empty or the line is blank
Q: Implement a C# WinForms application that tracks student names, university id, major, phone numbers,…
A: kindly check below i have helped you to solve the question...
Q: QUESTION IN ATTACHMENT! PLEASE CHECK ----AND ITS HUMBLE REQUEST TO USE ONLY BELOW TEMPLATES WHILE…
A: Coded using C++.
Q: 1. Express that a string starts with an ‘A’ , contains an ‘b’, and ends with an ‘c’
A: According to the guidelines we are only allowed to answer question at a time, please repost the…
Q: C++ We want to build an address book that is capable of storing name, address & phone number of a…
A: C++ Code for given scenario: #include<iostream>#include…
Q: Construct the directory structure as given below under the desktop of your computer, Rectangular box…
A: md : stands for make directory copy NUL filename.txt to create empty file You can also use…
Q: would you write a batch script/ Batch file for windows ( file.bat) to sort by column for a table…
A: Since, the sample output is not mentioned in the question we have provided the output in the most…
Q: Select all of the following Bash filename patterns that would only match the following filenames…
A:
Q: IMPORTANT: you need to complete the PDP thinking process your program. Turn in item: 1) one complete…
A: To provide implementation to the above question, a totally 4 functions are designed: view add…
Q: 2 Create two Input files (each with 20 rows). Each file has data as following Name, Marks Adam, 56…
A: import java.io.*; import java.util.*; class ReadFileWithoutThread { public static void…
Q: The command that is used to show the following results: Directory of D:\ 10/17/2018 10:24 PM…
A: 1) Command copy con aaa.txt copies content of con file into aaa.txt files 2) Command D>dir*.txt…
Q: Implement, using Java, an application to add user's transactions into a binary file, and then…
A: The answer provided below has been developed in a clear step by step manner.
Q: This is the question I am stuck on - A personal phone directory contains room for first names and…
A: import java.util.*; public class Main { public static void main(String[] args) {…
Q: QUESTION 14 When getting ready to make changes to a file on the Depot, which action should you use?…
A: Solution:-
Q: Question no 02:…
A: Note: As you have posted questions with multiple parts, we will solve the first three parts for you.…
Q: Let's finish working on our booking system. The last part for our booking system will be to manage…
A: Given :- Let's finish working on our booking system. The last part for our booking system will be…
Q: We want to build an address book that is capable of storing name, address & phone number of a…
A: Programming language is missing in the question. So we will answer this program in Java. If you want…
Q: Please use the osmodule to solve the following steps (You must use the os module): Assume your…
A: The above screenshots are the sample output. Program Code : import os #for changing the working…
Q: Take a look at the 'iris' dataset that comes with R. The data can be loaded with the code: 1…
A: R is the software programming language that is meant for statistical programming and graphics.It can…
Q: We have a text data file with 9 records. Each record has a name, a midterm score, and a final exam…
A: We have to write a python code in which the text is to be read, write and updated with new student…
Q: This is the question I am stuck on - A personal phone directory contains room for first names and…
A: package Java.C.c; import java.util.*; public class LongestLine { publicstaticvoidmain(String[]…
Q: This application must be able to handle creating new entries in a proprietary database as well as…
A: Actually, java is an object oriented programming language. It is a platform independent.
Q: Software Requirements: Latest version of NetBeans IDE • Java Development Kit (JDK) 8 Procedure: 1.…
A: // LoginDemo.java import java.io.File;import java.io.FileWriter;import java.io.IOException;import…
Q: #include #include #include #include int count = 0; void *threadfunc(void *arg){ cout<<"Thread…
A: The correct solution is given below with explanation
Q: ============================== 1. Add student records 2. Delete student records 3. Update student…
A: Write a program to keep records and perform statistical analysis for a class of students. The…
Q: • Maintain a database in a file: o Add a new vehicle to the fleet. Vehicle information should…
A: ANSWER:-
Q: Write a batch file where you will cycle trough colors A0, B0, C0, D0, E0, F0. You can use & to…
A: Actually, program is a executable software that runs on a computer.
Q: numbers = (38, 35, 28, 46, 92, 75, 49, 76, 81, 69) Partition (numbers, 4, 9) is called. Assume…
A: According to the information given:- We have to fill the blank on the basis of Quick sort.
Q: A Stationery supplier “Adwaat Al Maktabiyah” needs a program to display sales as per regions and add…
A: below is the program:
Q: This project requires the use of the employees.dat file (supplied). The record format in the file is…
A: Answer
Q: You are implementing a simple file system for an operating system for managing files and folders;…
A: Lets see the solution.
Q: You are implementing a simple file system for an operating system for managing files and folders;…
A: Answer : we have to implement a simple file system for an operating system so we have to make sure…
Q: Searching - a user should be able to search by ID or by item name create only one menu item for…
A: The answer is given below:-
We want to build an address book that is capable of storing name, Birthday & Email & address & phone number of
a person. Address book provides functionality in the form of a menu. The feature list includes:
• Add – to add a new person record
• Delete – to delete an existing person record by name
• Search – to search a person record by name
.. Sort - to sort the file after adding a new person record.
· Exit – to exit from application
Step by step
Solved in 3 steps
- Can someone please look at my script and explain why the data is not being read and entered into my pretty table? Any help is appreciated. Script is below. I am getting an empty pretty table as my output. # Python Standard Library import os from prettytable import PrettyTable myTable = PrettyTable(["Path", "File Size", "Ext", "Format", "Width", "Height", "Type"]) dirPath = input("Provide Directory to Scan:") i f os.path.isdir(dirPath): fileList = os.listdir(dirPath) for eachFile in fileList: try: localPath = os.path.join(dirPath, eachFile) absPath = os.path.abspath(localPath) ext = os.path.splitext(absPath)[1] filesizeValue = os.path.getsize(absPath) fileSize = '{:,}'.format(filesizeValue) except: continue # 3rd Party Modules from PIL import Image imageFile = input("Image to Process: ") try: with Image.open(absPath) as im: # if success, get the details imStatus = 'YES' imFormat = im.format imType = im.mode imWidth = im.size[0] imHeight = im.size[1] #print("Image Format: ", im.format)…Create comparators for the type File that arrange files according to file size, file name, and last modification date, in that order, in addition to ascending and descending. Use these comparators in the LS programme, which accepts a command-line input and lists the files in the current directory in the desired order, for example, "-t" to sort by timestamp.To break ties, back many flags. Use a stable sort, please.Create File comparators that arrange files in ascending/descending order of file size, ascending/descending order of file name, and ascending/descending order of last modification date. Employ these comparators in LS, a programme that accepts a command-line input and lists the files in the current directory in a certain order, such as "-t" to sort by timestamp.To break ties, support several flags. Be certain you use a reliable sort.
- In this assignment you will be writing several functions that process files and dictionaries to encryptand decrypt messages. A dictionary will be used to create a random substitution cypher. Each letterof the alphabet will be mapped to another random letter in the alphabet. No letter will map or bemapped to any duplicate letter. For example given the partial dictionary below you can encrypt amessage.Be sure to use the starter file provided so you can see the appropriate outputs. Be sure to downloadand place the appropriate text files in the same directory as your python file. You only need to submityour python file.Partial Dictionary: {d : a, e: f, h : b, l : p, l : e, o : j, r: m, w: i}originalMessage = “hello world” → encryptedMessage = “bfeej ijmea” Part 1 - Encrypt a Message: You will write 2 functions to build a dictionary and encrypt a messageFunction buildCypher() → dict:This function is to build a dictionary that can be used to create a random substitution cypher. Yourgoal is…In this assignment you will be writing several functions that process files and dictionaries to encryptand decrypt messages. A dictionary will be used to create a random substitution cypher. Each letterof the alphabet will be mapped to another random letter in the alphabet. No letter will map or bemapped to any duplicate letter. For example given the partial dictionary below you can encrypt amessage.Be sure to use the starter file provided so you can see the appropriate outputs. Be sure to downloadand place the appropriate text files in the same directory as your python file. You only need to submityour python file.Partial Dictionary: {d : a, e: f, h : b, l : p, l : e, o : j, r: m, w: i}originalMessage = “hello world” → encryptedMessage = “bfeej ijmea” Part 1 - Encrypt a Message: You will write 2 functions to build a dictionary and encrypt a messageFunction buildCypher() → dict:This function is to build a dictionary that can be used to create a random substitution cypher. Yourgoal is…This is the Source code of the KNN Algorithm by taking the Data and Training file. Question: I wanna take Data and Training Data from my Own User Input. K Value, All Data, Traning Data all have to take from User Input. SO, Modify This Code: from csv import reader from sys import exit from math import sqrt from operator import itemgetter def load_data_set(filename): try: with open(filename, newline='') as iris: return list(reader(iris, delimiter=',')) except FileNotFoundError as e: raise e def convert_to_float(data_set, mode): new_set = [] try: if mode == 'training': for data in data_set: new_set.append([float(x) for x in data[:len(data)-1]] + [data[len(data)-1]]) elif mode == 'test': for data in data_set: new_set.append([float(x) for x in data]) else: print('Invalid mode, program will exit.') exit() return new_set except ValueError as v: print(v) print('Invalid data set format, program will exit.') exit() def get_classes(training_set): return list(set([c[-1] for c in training_set]))…
- Assume the size of the file.txt below is 100 GB. Is there anything wrong with the following Spark code? Is there anything wrong with this code? How can it be fixed? from collections import defaultdict text_file = sc.textFile("file.txt") counts = text_file.flatMap(lambda line: line.split(" ")).map(lambda word: (word, 1)).collect() key_val = defaultdict(int) for item in counts: key = item[0] val = item[1] key_val[key] += int(val) filtered_key_val = dict() for k, v in key_val.items(): if v >= 100: filtered_key_val[k] = v return filtered_key_valSuppose that you have two text files that contain sequences of integers separatedby whitespace (blank space, tabs, and line breaks). The integers in both filesappear in sorted order, with smaller values near the beginning of the file andlarge values closer to the end. Write a pseudocode algorithm that merges thetwo sequences into a single sorted sequence that is written to a third fileWrite comparators for the typeFile to order by increasing/decreasing order of file size, ascending/descending orderof file name, and ascending/descending order of last modification date. Use thesecomparators in a program LS that takes a command-line argument and lists the filesin the current directory according to a specified order, e.g., "-t" to sort by timestamp.Support multiple flags to break ties. Be sure to use a stable sort
- How can I change this function ? I need to open the file and can write the name I want to delete . And be deleted. void removeContact(){fstream file;file.open("Contact'sBook.txt");browse();int delChoice;cout << "Enter Contact to be deleted by index no"<< endl;cin >> delChoice;for(int i =delChoice-1; i < count-1;i++){Person[i].FullName = Person[i+1].FullName;Person[i].Birthday =Person[i+1].Birthday;Person[i].Address = Person[i+1].Address;Person[i].Email= Person[i+1].Email;Person[i].PhoneNumber = Person[i+1].PhoneNumber;}count--;cout<< "AddressBook after deletion is " <<endl;browse();} Textfile contains for ex Helena but my function dosn´t find it.hi I need you to add this feature to the code down below, please def add():id = input("Enter ID:")f = open("data.txt", "r")id_list = []lines = f.readlines()if lines != "":for line in lines:token = line.split(" ")id_list.append(token[0])for i in id_list:if i == id:print("The student record is already in the database!Zero records added")returnf.close()file = open("data.txt", "a")name = input("Enter name: ")course = input("Enter course: ")absences = int(input("Enter absences: "))exam1 = int(input("Enter exam 1 grade: "))exam2 = int(input("Enter exam 2 grade: "))marks = int(input("Enter Total Marks: "))s = id+" "+name+" "+course+" "+str(absences)+" "+str(exam1)+" "+str(exam2)+" "+str(marks)+"\n"file.write(s)file.close()while True:print("1.Add a student")print("Any other numeric to terminate")choice = int(input())if choice == 1:add()else:breakExplain the difference between Sequential Files and Random Files? Why is it important to close the File objects after using them in the code?