1) Write a python program that takes a person’s details (name, age and a city), and writes to a file (persons.txt) using a loop repeatedly. You should write three person’s to the file. The program terminates on entering any key by the user, except on (Y or y) key. Sample output of the first run of the program is shown below: Enter name: John Enter age: 20 Enter city: Sydney Data saved: John 20 Sydney Press (Y or y) to add another person, or any key to exit
Q: Explain the meaning of project scheduling. Which considerations should be considered while…
A: Project schedule surely approach a mechanism this is used to communicate and realize approximately…
Q: What is the difference between a Queue and a Deque in terms of add and removing elements ?
A: Queue : A simple data structure called a queue allows elements to be added and removed starting at…
Q: CENGAGE MINDTAP Programming Exercise 3.9 D lil √> E O Tasks Define the insertionSort() function The…
A: Hello student
Q: The intermediate stage is the layer positioned between the database and client servers.
A: Introduction: The display layer, the application layer, and the data layer make up the three-tier…
Q: Give a specific example of how the Service-Oriented Architecture (SOA) concept works in practice. It…
A: What is SOA or Service Oriented Architecture?SOA, or service-oriented architecture, defines a way to…
Q: solve the question using java please do it fast. please proved me the type formate it code Implement…
A: Here is the java code of above problem. See below steps for code.
Q: Sname Owner SHIP_MOVEMENT HISTORY Prame N SHIP HOME PORT PORT Latitude (0) (0) Time stamp Longitude…
A: Solution :- Given ER diagram into relational schema :- SHIP(Sname(PK),Owner,SHIP_AT_PORT(FK OF PORT…
Q: What variables contribute to the worse performance of wireless networks relative to wired networks,…
A: Introduction: Wireless networks will ineluctably be less secure than connected networks since…
Q: Give an overview of the many data concealment mechanisms that pose considerable problems for law…
A: Please find the detailed answer in the following steps.
Q: What are some examples of real-world applications of binary search trees that may be incorporated in…
A: Introduction: The binary tree is similar to a tree with node hierarchies. The root node is at the…
Q: A wide range of ciphering algorithms, both symmetric and asymmetric, are utilized in the process of…
A: Introduction: The second kind of cryptography is asymmetric cryptography. Asymmetric cryptography is…
Q: Explain how social networking, online discussion forums, chat rooms, newsletters, blogs, podcasts,…
A: Introduction: Social networking helps individuals engage with friends, family, and business…
Q: Are IDPS systems risk-free in all circumstances?
A: An intrusion detection system (IDS) monitors a network or system for malicious activities or policy…
Q: Write a C program that asked the user to enter an integer MAX where 101000. The program then…
A: C program to print a table.
Q: What are the most current advancements in information technology?
A: Advancements in Information Technology: More technological evolution is notably made possible by…
Q: Why is Switch a smarter alternative than Hub? It is critical to distinguish between services that do…
A: The solution to the given question is: A switch has a connection point for connecting devices on a…
Q: overload.cpp 1 #include "overload.h" 2 3 4 5 6 7 } 8 overload.h 123456 #ifndef OVERLOAD H 2 #define…
A: In this question we need to debug the given code and provide proper method to implement the two…
Q: A count-controlled loop must possess three elements: 1. 4 It must initialize a control variable to a…
A: When the number of iterations to occur is already known, a count-controlled loop is used.Because it…
Q: . Write a C++ program to take input three angles from the user and check wheth an be formed from the…
A: The code is below:
Q: What type of interaction exists between user applications and system services in the context of a…
A: Architecture based on the microkernel: A concept for a microkernel that is known as a plugin…
Q: In C++ Output all combinations of character variables a, b, and c, in the order shown below. If a…
A: Declare three variables a, b, and c. Input the values of these variables from the user. Finally,…
Q: are "store-and-forward networks" not used as often as they formerly were? Furthermore, please…
A:
Q: Draw an ER diagram that describes the following data and relationships: • A health care organisation…
A: The answer for the above question is given in the below step.
Q: Make a description in the fully-dressed format for place order Activity for online food delivery…
A: Answer: We need to draw the activity diagram for the online food delivery system. so we will see in…
Q: The relational data model represents data as being stored in tables. Spreadsheets are another tool…
A: The above question is solved in step 2 :-
Q: What kinds of talents are necessary to be effective while working with predictive models?
A: Introduction; Predictive modelling is a widely-used statistical approach for forecasting future…
Q: Fill in the blanks 1. cryptographic algorithms can be divided into three categories: keyless,…
A: The above question is solved in step 2 :-
Q: 17.14 LAB: Convert to reverse binary Write a program that takes in a positive integer as input, and…
A: KINDLY REFER TO BELOW ? STEP BY STEP COMPLETE PROGRAM AND SCREENSHOT OF OUTPUT :
Q: Notes: -The maximum size of any c-string in this lab is 100 characters and it should be dynamically…
A: Here is the c++ code of the above solution. See below steps for code.
Q: Arithmetic Modulo 2 Find the quotients and remainders for the following division problems using…
A: The solution is given below for the above given question:
Q: What role does MVC play in the overall web application architecture? What are some of the benefits…
A: Web MVC framework: Requests are sent to handlers using a Dispatcher Servlet in the Spring Web MVC…
Q: Describe each of the following technical platforms utilized in human-computer interaction in detail…
A: Human–computer interaction is research on the design and use of computers that focuses on how people…
Q: Write a program that reads two vectors and calculate the angle in radius between these two vectors ,…
A: Here is the solution to the above code. See below step for code.
Q: The use of operations that cannot be reversed by asymmetric ciphers helps to the improved degree of…
A: Introduction: Asymmetric encryption employs connected public- and private-key pairs to encrypt and…
Q: the potential impact of process scheduling on concurrently running applications.
A: Introduction: Process scheduling is the process manager's action, which entails removing the current…
Q: Currently, it is necessary to address IPv6, the Internet, private networks, and voice over internet…
A: Answer: We need to write the what is necessity of IPv6 over the public network and How VoIP used for…
Q: It contains four routers in total. Every one of the four main types of routers Is it necessary for…
A: A distance-vector routing protocol is called Routing Information Protocol (RIP). When using the…
Q: Please describe how the building of a wireless network may be beneficial in the case of a disaster.
A: Wireless network As the name indicates that wireless networks are the computer systems that are not…
Q: What function does the usage of foreign keys play in ensuring the integrity of a database? What type…
A: Introduction: A foreign key relationship indicates that an index in one table is connected to an…
Q: . Write a JAVA program to input elements in two array and merge two array to third array. How to…
A: To input elements in two array and merge two array to third array.
Q: Regardless, is it advantageous for people with disabilities to be linked to the internet? In the…
A: Internet access enhances the life of visually challenged individuals. They have the following…
Q: How can the TPM monitor effectively handle memory and CPU resources in compared to standard…
A: TP-monitor: It is an application server that lets a lot of people run applications while using as…
Q: The layer between the database and client servers is referred to as the "middle layer."
A: There are 3 layers in the client-server database model , 1. Presentation layer: Responsible for…
Q: The do-while loop is a pretest loop. Select one: True False
A: Solution do-while loop It is an looping statement which is used in most of the languages. Syntax…
Q: Regex, APIs, BeautifulSoup: python import requests, re from pprint import pprint from bs4 import…
A: # def companies(website): # # Acces the table at the provided website: # #…
Q: The layer between the database and client servers is referred to as the "middle layer."
A: Introduction: In terms of communication, the application layer is responsible for regulating…
Q: Which community of interest takes the lead in managing the risks associated with information assets…
A: Information Asset: An information asset can be arranged by any model, not just by its general…
Q: actual instances of how innovative applications might be found via human-computer interaction.
A:
Q: Use java code Body Mass Index (BMI) is a measure of health on weight. It can be calculated by taking…
A: Here is the java code of above problem. See below steps for code.
Q: In what particular ways may the Model-View-Controller design help with web application organization?…
A: Introduction: How can MVC help with web application organisation? What are the benefits of using an…
Python Pro
1) Write a python
file (persons.txt) using a loop repeatedly. You should write three person’s to the file.
The program terminates on entering any key by the user, except on (Y or y) key.
Sample output of the first run of the program is shown below:
Enter name: John
Enter age: 20
Enter city: Sydney
Data saved: John 20 Sydney
Press (Y or y) to add another person, or any key to exit
Step by step
Solved in 4 steps with 3 images
- 9.12 LAB: File name change PYTHON A photographer is organizing a photo collection about the national parks in the US and would like to annotate the information about each of the photos into a separate set of files. Write a program that reads the name of a text file containing a list of photo file names. The program then reads the photo file names from the text file, replaces the "_photo.jpg" portion of the file names with "_info.txt", and outputs the modified file names. Assume the unchanged portion of the photo file names contains only letters and numbers, and the text file stores one photo file name per line. If the text file is empty, the program produces no output. Ex: If the input of the program is: ParkPhotos.txt and the contents of ParkPhotos.txt are: Acadia2003_photo.jpg AmericanSamoa1989_photo.jpg BlackCanyonoftheGunnison1983_photo.jpg CarlsbadCaverns2010_photo.jpg CraterLake1996_photo.jpg GrandCanyon1996_photo.jpg IndianaDunes1987_photo.jpg LakeClark2009_photo.jpg…12.12 LAB: File name change A photographer is organizing a photo collection about the national parks in the US and would like to annotate the information about each of the photos into a separate set of files. Write a program that reads the name of a text file containing a list of photo file names. The program then reads the photo file names from the text file, replaces the "_photo.jpg" portion of the file names with "_info.txt", and outputs the modified file names. Assume the unchanged portion of the photo file names contains only letters and numbers, and the text file stores one photo file name per line. If the text file is empty, the program produces no output. Ex: If the input of the program is:12.12 LAB: File name change A photographer is organizing a photo collection about the national parks in the US and would like to annotate the information about each of the photos into a separate set of files. Write a program that reads the name of a text file containing a list of photo file names. The program then reads the photo file names from the text file, replaces the "_photo.jpg" portion of the file names with "_info.txt", and outputs the modified file names. Assume the unchanged portion of the photo file names contains only letters and numbers, and the text file stores one photo file name per line. If the text file is empty, the program produces no output. Ex: If the input of the program is: ParkPhotos.txt and the contents of ParkPhotos.txt are: Acadia2003_photo.jpg AmericanSamoa1989_photo.jpg BlackCanyonoftheGunnison1983_photo.jpg CarlsbadCaverns2010_photo.jpg CraterLake1996_photo.jpg GrandCanyon1996_photo.jpg IndianaDunes1987_photo.jpg LakeClark2009_photo.jpg…
- Code should be in Python. A photographer is organizing a photo collection about the national parks in the US and would like to annotate the information about each of the photos into a separate set of files. Write a program that reads the name of a text file containing a list of photo file names. The program then reads the photo file names from the text file, replaces the "_photo.jpg" portion of the file names with "_info.txt", and outputs the modified file names. Assume the unchanged portion of the photo file names contains only letters and numbers, and the text file stores one photo file name per line. If the text file is empty, the program produces no output. (Examples in image)8.7 LAB: File name change A photographer is organizing a photo collection about the national parks in the US and would like to annotate the information about each of the photos into a separate set of files. Write a program that reads the name of a text file containing a list of photo file names. The program then reads the photo file names from the text file, replaces the "_photo.jpg" portion of the file names with "_info.txt", and outputs the modified file names. Assume the unchanged portion of the photo file names contains only letters and numbers, and the text file stores one photo file name per line. If the text file is empty, the program produces no output. Ex: If the input of the program is: ParkPhotos.txt and the contents of ParkPhotos.txt are: Acadia2003_photo.jpg AmericanSamoa1989_photo.jpg BlackCanyonoftheGunnison1983_photo.jpg CarlsbadCaverns2010_photo.jpg CraterLake1996_photo.jpg GrandCanyon1996_photo.jpg IndianaDunes1987_photo.jpg LakeClark2009_photo.jpg…pls code in pythonplagiarism: This Boolean function takes two filenames. If any line occurs in both files, return True.If not, return False. I suggest using nested loops. With nested loops, we call the loop that is in thebody of the other loop, the "inner loop". The loop that contains the inner loop is the "outer loop". Openthe second file inside the outer loop:for line1 in file1:file2 = open(fname2)for line2 in file2:Python only lets you read the file once per open, so you need this order of instructions. Make sure yourreturn False is outside of both loops. Otherwise, you will only compare the first two lines of thefiles. Make sure you close the file that gets read repeatedly after the inner loop but still inside the outerloop.Here is some (more complete) pseudocode to get you started:open file 1for line1 in file 1open file 2for line2 in file 2:if line1 == line2:return Trueclose file 2return False
- 6.20 Word count (c++) using (#include<fstream>) Write a program that prompts the user to input the name of a text file and then outputs the number of words in the file. You can consider a "word" to be any text that is surrounded by whitespace (for example, a space, carriage return, newline) or borders the beginning or end of the file.Input Notes: There are two input sources in this program: the text file and standard input. The standard input consists of a single word, the name of the text file to be read. DO NOT USE A STRING VARIABLE.Output Notes (Prompts and Labels): The filename provided in standard input is prompted for with "Enter a file name: " and displayed so that the filename entered is on the same line as the prompt.The output of the program is a single line of the form: "The file contains N words." where N is the number of words determined by the program.2. This involves a .txt file with one thousand rows of random numbers (between 1-1000) Using Python, create a program to perform this task, with 3 methods of doing this: Read the entire contents of file1.txt into memory, then process each row. Read one row of file1.txt at a time and process it. Split file1.txt into 2 parts and read each part into memory separately.6.20 Word count (c++) Write a program that prompts the user to input the name of a text file and then outputs the number of words in the file. You can consider a "word" to be any text that is surrounded by whitespace (for example, a space, carriage return, newline) or borders the beginning or end of the file.Input Notes: There are two input sources in this program: the text file and standard input. The standard input consists of a single word, the name of the text file to be read. DO NOT USE A STRING VARIABLE.Output Notes (Prompts and Labels): The filename provided in standard input is prompted for with "Enter a file name: " and displayed so that the filename entered is on the same line as the prompt.The output of the program is a single line of the form: "The file contains N words." where N is the number of words determined by the program.
- Section 1 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. Section 2 Redo the previous project described in Section 1 using a struct to store each student’s data and an array of structs to store the whole class. The struct should have data members for id, score, and grade.Write code that does the following: opens an output file with the filename number_list.txt, uses a loop to write the numbers 1 through 100 to the file, and then closes the file.14.11 (Python Please) (Count consonants and vowels) Write a program that prompts the user to enter a text filename and displays the number of vowels and consonants in the file. Use a set to store the vowels A, E, I, O, and U.