Print Person Information from file In this lab you are asked to complete the function : print_person_from_file(person_name, filename). This function should read in data from the file filename and print the information for person_ nameif it is found in the file. The file filename contains lines, in comma separated format (with a 'csv' extension) For each line, the items in each field are as follows:
Q: Write a java procedure that implements the more-efficient binary search algorithm a) test that x = “...
A: I give the code in Java along with output and code screenshot
Q: Given an array of integers, define a function that takes the array as a parameter and return true if...
A: Python Code: def checkFL6(a): if(a[0]==6 or a[-1]==6): return True else: return ...
Q: Explain the role of the Turing test in the development and advancement of AI robots
A: Introduction: Turing test's role in the creation and improvement of robots in the AI domain:
Q: QUESTION 28 If four 4-kbps connections are multiplexed together using synchronous TDM. Fim 1. The du...
A: Introduction
Q: For a UNIX program in C++, write a code segment to get the HOME directory, set PREVDIR to the curren...
A: Start Check for the current working directory If the directory found Change to home directory Other...
Q: Explain briefly each of the cloud computing services listed below. In each service category, identif...
A: Application cloud services: A cloud application basically a kind of software application that is nee...
Q: When is it necessary to qualify the name of a field, and how do you go about doing so?
A: Introduction: If a field name appears in more than one of the tables given in the FROM clause, it mu...
Q: What options are there for controlling data integrity at the field level in databases?
A: Introduction: The database designer is in responsible of incorporating features that guarantee the s...
Q: Write a program that keeps on taking numbers from the user, until the user enters any input that it ...
A: Answer: Java Source Code: import java.util.*;import java.lang.*;public class Main { public static...
Q: g through multi-dimensional arrays, functions, function overloading Instructions: 1) Write a S...
A: the code is an given below :
Q: Example-3: Write a program to calculate the Area and volume for a sphere. Sol. -The area of sphere 4...
A: Given To do a program to find the area and volume of Sphere.
Q: Q6 [3-46] Write the AHDL code that will implement the following logic circuit. (a) Use a single Bool...
A: Answer : VHDL code :
Q: What is a learning system? Give an example of a learning system and explain
A: A learning system is basically an assortment of antiques that are 'united', in a proper way, to esta...
Q: Show the output waveform of an AND gate with the inputs A, B, and C indicated in the figure below.
A:
Q: What are the benefits of using namespaces
A: Solution:-
Q: Assume x goes to $s0, y goes to $s1, and the address of the first element in the array A goes to $s2...
A: Given that, Assume x goes to $s0, y goes to $s1, and the address of the first element in the array A...
Q: c) Given graph G=(N,E), where N is the set of routers and E is the set of links. Using Dijkstra's li...
A: Here, we are going to calculate the least cost path from Node U to all others and also will show the...
Q: What exactly is the Windows Form Designer window?
A: Introduction the question is about the Windows Form Designer window and here is the solution in the ...
Q: Explain what is the differences between Breadth First Search (BFS) and Depth First Search (DFS).
A: To explain difference between DFS and BFS.
Q: dentity theft is still a concern for consumers and organizations. Assume you're a database administr...
A: Introduction: A database administrator's (DBA) duty is to create and manage databases according to...
Q: Assume x goes to $s0, y goes to $s1, and the address of the first element in the array A goes to $s2...
A: Given that, Assume x goes to $s0, y goes to $s1, and the address of the first element in the array A...
Q: Write a function combine(names, ages) that takes in two lists, names and ages and returns a list of ...
A: Given :- Write a function combine(names, ages) that takes in two lists, names andages and returns a ...
Q: Consider the WAN, or wide-area network, as your preferred means of wireless connectivity. What disti...
A: Intro It can be tough to defend your home wireless network from infiltration if your wifi connection...
Q: A memory location might be sequential or direct. Why do key gadgets utilize direct access now? How c...
A: Your answer is given below in detail with explanation. Introduction :- Sequential access, often kn...
Q: What are the advantages of utilising containers to replace virtual machines?
A: Intro Virtual machine (also known as a virtual machine): A Virtual Machine (VM) is a registered ass...
Q: Q3 In the IPv4 Header format following information is given in decimal number system , with respect ...
A: Lets see the solution in the next steps
Q: Assume you apply a functional dependence in the BCNF decomposition technique to deconstruct a relati...
A: Intro Assume you apply a functional dependence in the BCNF decomposition technique to deconstruct a ...
Q: What exactly is the value parameter? How is it made?
A: Introduction the question is about the value parameter and here is the solution in the next step.
Q: Why do we require these two kinds of DNS addressing schemes?
A: DNS Addressing Schemes: It is a central part of the internet that provides a way to match numbers wi...
Q: Execute the following commands in the order listed below and obtain a (single) screenshot showing th...
A: Display the current date using the ‘date’ command (press Enter at the prompt to keep the same date) ...
Q: If an 8-bit binary number is used to represent an analog value in the range from 200 ounces to 700 o...
A: Answer is in given below.
Q: Consider the bitmap form of the free-space map, in which two bits are kept in the bitmap for each bl...
A: Intro Consider the bitmap form of the free-space map, in which two bits are kept in the bitmap for e...
Q: Find the domain and range of these functions. Note that in each case, to find the domain, determine ...
A: Hi there, Please find your solution below, I hope you would find my solution useful and helpful. Tha...
Q: B) Write a PYTHON script to enter a value of S (between 1 and 3) for (50) entered values of X then f...
A: According to the information given:- We have to write python code on the basis of instruction mentio...
Q: Write a Java program to check whether the user entered number is within 10 of 100 or 200. If it is i...
A: Write a JAVA program to check whether the user entered is within 10 of 100 or 200. If it is in then ...
Q: Given the number of people attending a pizza party, output the number of needed pizzas and total cos...
A: Accept number of people attending a pizza party Assign 14.95 to the PizzaCost Assign 12 to the slice...
Q: With practical examples, discuss the difference(s) between a Web Server software and a Web Client so...
A: Web Server Software: A web server is nothing but a combination of hardware and software that uses hy...
Q: What are the reasons Pine Valley Furniture Company could require a data warehouse?
A: Data warehouse for Pine Valley Furniture Company (PVFC) Combining the data from one or more sources ...
Q: . Java is known to be an object oriented program. Objects are also known to exist in real life. You ...
A: A real-world entity such as a pen, chair, table, computer, watch, and so on is referred to as an obj...
Q: Discuss the goal and purpose of prototyping in software engineering.
A: Purpose The basic aim of problem analysis is to obtain a clear understanding of the needs of the cl...
Q: r) Input a string s that contains lowercase alphabets. Then write a function that takes the string s...
A: Code: #include <iostream>#include <time.h>using namespace std;#include<string.h>st...
Q: a) Encrypt the plaintext "blotto" using CT R mode. Please enter your answer in hex. (Please do *not*...
A: We have to encrypt the given following plaintexts into the equivalent hexadecimal format using diffe...
Q: Distinguish between the phrases primary key, candidate key, and super key.
A: Primary key The term primary key is used to denote a candidate key that is chosen by the database d...
Q: Write a subroutine which copies a string starting from address $1100 to a location starting from add...
A:
Q: Describe the SBB instruction in further detail.
A: Given: Describe the SBB instruction in further detail.
Q: When it comes to presenting data to humans or other devices, what element of the computer is respons...
A: Introduction : Make a list of the data to be gathered and its format, as well as the study's goals. ...
Q: What is the process of assessing if software satisfies business needs and is produced in compliance ...
A: The process of assessing if software satisfies business needs and is produced in compliance with cor...
Q: Explain physical data independence and its significance in database systems.
A: Introduction Physical information Independence : Physical information Independence is outlined becau...
Q: Why are some functional dependencies referred to be trivial functional dependencies?
A: A function that takes no parameters or returns no values, for example, is a simple functional depend...
Q: Show how video recording works and how it relates to multimedia creation.
A: Video recording is a great skill to learn the cameraman in the news or cinematic industries is an ex...
Step by step
Solved in 3 steps with 2 images
- Finish this program from the code posted below! Note: There should be two files Main.py and Contact.py You will implement the edit_contact function. In the function, do the following: Ask the user to enter the name of the contact they want to edit. If the contact exists, in a loop, give them the following choices Remove one of the phone numbers from that Contact. Add a phone number to that Contact. Change that Contact's email address. Change that Contact's name (if they do this, you will have to remove the key/value pair from the dictionary and re-add it, since the key is the contact’s name. Use the dictionary's pop method for this!) Stop editing the Contact Once the user is finished making changes to the Contact, the function should return. Code:from Contact import Contactimport pickledef load_contacts():""" Unpickle the data on mydata.dat and save it to a dictionaryReturn an empty dictionary if the file doesn't exist """try:with open("mydata.dat", 'rb') as file:return…String data type is not allowed you can make use of CString instead (char arrays with null termination). Q1. Create an Input File with the following information regarding to inventory: Item_Id Price Quantity Availability Add atleast 10 records in input file. Where item_id will be of type int , price will be of type double , quantity will be of type int and Availability will be of type char representing the status y for yes the product is available and n for not available. Write a menu driven C++ program to perform the following four tasks in a single file, if user press option 1 the task 1 get solved and so on: 1. Display the Item_Id of the products which are not available in stock on screen. 2. Copy all the available products data in a separate file. 3. Read the original input file and update the price of each item by 10 percent increase in the original price and save the complete information in separate file. 4. Try to save the information processed in part 3 in the original…Python Programming Assignment: Create a dictionary that takes a basketball team's information (that includes team's name and points) as parameter, creates a teams_dict and returns it. Also, create a parameter for write_file parameter that opens current results text file in write mode and writes the dictionary information to file as per format and closes the file.
- Transcribed Image Text A summer camp offers a morning session and an afternoon session. The list morningList contains the names of all children attending the morning session, and the list afternoonList contains the names of all children attending the afternoon session. Only children who attend both sessions eat lunch at the camp. The camp director wants to create lunchList, which will contain the names of children attending both sessions. The following code segment is intended to create lunchList, which is initially empty. It uses the procedure IsFound (list, name), which returns true if name is found in list and returns false otherwise. FOR EACH child IN morningList { <MISSING CODE> Which of the following could replace <MISSING CODE> so that the code segment works as intended? IF (IsFound (afternoonList, child)) { A APPEND (lunchList, child)Saving a Document as a Text File Create a function save_document() that accepts the arguments filename and text and saves the text into the file filename. The filename should use the name of the document with ‘_edited_document’ appended to it. For example, for the document text.doc, the save document should have the name text_edited_document.txt. The file should be saved in the folder “edits.” Assume that the folder already exists in the present working directory.Create a structure called applianceTvpe with the following members. Use the proper variable TYPES for the members: name; SUpplierlD: modelNo: cost; Create an array variable of type applianceType that can hold 50 components. Write the code segment to read from a file into the structure array. Declare an input file stream identifier for this purpose. Open the file and read until end of file. Keep a count of how many rows actually read. The data file contains the following data: RefrigeratorABC 80 4657 521.62 ToasterOven 100 3245 245.96 MicroWave 95 7878 345.67 Using a looping construct, output to the console (cout) the data read into the structure array. Make sure you do not go outside the bounds of the array or beyond the number of rows actually read. You do not need to write any #include statements, using statements and you do not have to write code to open the file. Assume the file is open. You do need to declare variables needed for the program segment.
- 1994 Weekly Gas GraphIn the student sample programs for this book, you will find a text file named 1994_Weekly_Gas_Averages.txt. The file contains the average gas price for each week in the year 1994.(There are 52 lines in the file.) Using matplotlib, write a Python program that reads thecontents of the file then plots the data as either a line graph or a bar chart. Be sure to displaymeaningful labels along the X and Y axes, as well as the tick marks. (in python)Submission: Combine the code files for Q1 and Q2 as a zip file and submit in Moodle Question 1: Write a Program that to enter Student Name, Grade and print it to the screen with below requirements . . . . Asks the users how many student grades they want to enter. Based on that number the program should setup a loop to ask the user to enter student name and the student grade. Save this information using 2 arrays At the end the program must show the student names and grades with 1 student on each line on the screen Program should use Arrays and loops to achieve the task.main() will call create() and then call retrieve() create() will prompt the user to enter any number of course name / grade pairs and write them to a file named grades.txt. Pressing Enter with no input value on the course name will exit the loop, close the file, print "File was created and closed" and return the bool value True to the main() retrieve() will open and read grades.txt. The function then will print the course names and scores as shown below. The average score should be calculated as well as a simple GPA and displayed to two decimal places and then return variable used for the GPA to the main() . See sample run below in which 4 course names were entered, but note that more or fewer courses could have been entered. Enter course name or Enter to quit: CPO1000 Enter grade (integer) achieved: 96…
- 1. Creating Employee Data ( Page 625)Create an application that allows the user to enter the following employee data: First Name, Middle Name, Last Name, Employee Number, Department, Telephone Number, Telephone Extension, and E-mail Address. The valid values for department are Accounting, Administration, Marketing, MIS, and Sales. Once the data is entered, the user should be able to save it to a file. Figure 9-30 shows an example of the application’s form. The form shown in Figure 9-30 has a combo box for selecting the department; a Save Record button, which writes the record to a file; a Clear button, which clears the text boxes; and an Exit button. Write code in the Form_Load event handler that allows the user to enter the name of the file. If the file does not exist, a new one will be created. If the file already exists, the input data will be appended to the file. ******** Make sure to test your project by entering a new text file name, and then to confirm you are appending data to…Name SearchIn the Chap07 folder of the Student Sample Programs, you will find the followingfiles:• GirlNames.txt—This file contains a list of the 200 most popular names given to girls born in the United States from 2000 through 2009.• BoyNames.txt—This file contains a list of the 200 most popular names given to boys born in the United States from 2000 through 2009.Create an application that reads the contents of the two files into two separatearrays or Lists. The user should be able to enter a boy’s name, a girl’s name, orboth, and the application should display messages indicating whether the nameswere among the most popularwithout using files develop a library management system application. Morespecifically, your application should use an array of structuresto keep the details of the booksand the user should be able to add a new book, search for a book and find available books toborrow. The book details entered by the user should be stored in a structure using thefollowing details:• Book ISBN• Book title• Author full name• Publication Year• Availability for loan [yes/no] The user of this application should have the following options in the form of a nice presentedmenu.Add a book: The user should add all the details of each book by answering a set of questions(book isbn? Book title? author? year?). The availability for loan is randomly generated by theprogram (y: yes, n:no). Assume that the maximum number of books that the user can giveyou is 50.Search for a book: The user should be given three options here.▪ Search by the title: The user will input a keyword and the program willsearch for all the titles…