Write a program to open the file romeo.txt and read it line by line. For each line, split the line into a list of words using the split function. For each word, check to see if the word is already in a list. If the word is not in the list, add it to the list.
Q: #include #include "ContactNode.h" int main() { ContactNode* contactList = new ContactNode();…
A: The source code of the program #main.cpp #include <iostream>#include "ContactNode.h"int…
Q: This is because of the exponential growth in computer power over the last several years. How can we…
A: We must characterise how powerful computers have become in recent years. How can it be proved that…
Q: Can two types of app support be provided via the Internet? You can easily understand why they're so…
A: SaaS is Internet-delivered software. The internet removes software installation and maintenance,…
Q: people make productive use of the internet? So, what makes telemedicine distinct from telesurgery?
A: The Internet is a huge global network that connects computers. From any place with an Internet…
Q: Does Linux have a mechanism to back up its operating system?
A: Before exploring methods particular to CentOS for deploying a standard backup plan, let's first…
Q: Connected systems can't function without communication processors. Switches, routers, hubs, and…
A: Switches, routers, hubs, and gateways are examples of the communication processors required by…
Q: Make a project on the following topics: Virtualization for Home Automation Virtualization for Web…
A: Given: Make a project on the following topics: Virtualization for Home Automation Virtualization…
Q: Software engineers require logic instructions in a systematic way to increase product quality.
A: If you can figure out how to implement good testing practices as soon as feasible, you'll be able to…
Q: Provide an in-depth explanation of the potential applications of quantum entanglement to the fields…
A: quantum entanglement Is defined as one of the physical resource, like energy,that is associated with…
Q: You were given five processes with their arrival time and execution time for each in the table.…
A: Introduction First-Come-First-Served (FCFS): First-Come-First-Served (FCFS) is a non-preemptive…
Q: Which is the definition of a characteristic table? Select an answer and submit. For keyboard…
A: Q-1 Which is the definition of a characteristic table?A correct answer is option (d): "Sets out the…
Q: Tools and methods for keeping planes in flying condition. Which advantages does this method have…
A: Introduction: Data analytics give a maintenance solution for processing data from aircraft health…
Q: How many steps are there in creating a website? Using your own words, describe each stage and then…
A: Website creation: Web development processes detail the steps needed to construct a conventional Web…
Q: o what extent can we define a finite state machine? Let's break it down and talk about what it is…
A: Automata: Automata are systems that use a finite set of rules to process inputs and generate…
Q: Which of the following is the definition of FG Ox(xEFA x G) OVx(x EG → x F) Ox(x EG A x F) OVx(x EF→…
A: The expression F∉G means that set F is not a subset of set G. The correct definition for this…
Q: In the case of software or program malfunction, it is crucial to take into account the various…
A: Portable computers are tiny enough to fit in your hand and designed to be portable. Low-end phones,…
Q: 9. What does the size member function return? Place a check (✔) beside your answer. a. The number of…
A: ''Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: NFC (Near Field Communication) protocol including its architecture, communication protocol, and use…
A: Introduction Near Field Communication (NFC) Protocol Near Field Communication (NFC) is a…
Q: Put yourself in control of crime prevention in Kampala. AI's accumulated knowledge may be utilized…
A: Introduction Artificial Intelligence: AI (Artificial Intelligence) is a type of computer science…
Q: Figure out the means through which people may more readily flout moral norms and social…
A: There are several ways in which technology advances have made it easier for people to flout moral…
Q: virtualization in application server virtualization in file server
A: Virtualization means making a use of system with using any ohysical devices. In simple term we can…
Q: How about you clarify what you mean by "scalability" in the cloud? What several factors affect…
A: Scalability: Scalability is the ability of a system or application to handle increasing amounts of…
Q: IThe design of network apps and the design of other types of software applications is there a…
A: software applications:- Software applications, or apps, are programs that are designed to perform…
Q: Choose an idea that might help boost student enrolment at your local school. Everyone may enroll in…
A: I graduated from the state university WBTU. Students may register for college admissions to a…
Q: What are three benefits of incremental development over the waterfall approach?
A: advantages of gradual growth Lower Costs If the needs are appropriately prioritized in an…
Q: Possible Linux rocketry applications.
A: Linux rocketry applications: Linux rocketry applications are programs developed to help launch and…
Q: Imagine email in your own words. If I send a message through email, how does it go from my computer…
A: An email is sent via the Simple Mail Transfer Protocol (SMTP) and then delivered to the Mail…
Q: The information stored in the interrupt vector table is distinct for each entry
A: When an interrupt occurs, the computer's hardware looks up the appropriate interrupt vector in the…
Q: Determine how people respond when they have issues with the software on their desktops or mobile…
A: Introduction: Software-related reactions: Updated software causes issues. frustrated. Overcrowding…
Q: Several different kinds of software resources may be pooled in a distributed system. If you don't…
A: computer that hosts web server software and website component files such as HTML documents
Q: Software-based Virtual Network Functions (VNFs) provide networks increased speed, agility, and…
A: Implementing certain network operations as virtual machines on top of networking infrastructure is…
Q: This is due to the exponential growth in computing power over the last several decades. How can we…
A: Given: Since their invention, computers have shown to be dependable, but they are also pervasive; we…
Q: Discuss the many software system design inputs and outputs.
A: Input refers to the unprocessed data that an information system uses to create output.
Q: If you're in charge of picking an EHR system and getting it set up, you'll need to make arrangements…
A: A project manager is someone who oversees the whole project while taking all of its factors into…
Q: Find out whether it's appropriate to use buddy functions, how to create them, and how to use them in…
A: Buddy functions are often used in programming languages like C++ to link two separate classes. Buddy…
Q: In what ways do you define cybercrime? Provide examples of THREE broad classes of criminal behavior…
A: Cybercrime refers to any criminal activity that involves the use of a computer as a tool to promote…
Q: Your employer has just implemented a new security policy that requires all workers to utilize…
A: Instead of providing a user name and password for security, you may use a fingerprint reader, which…
Q: In what ways do schools and other educational institutions use computer networks? Compared to other…
A: Computer networks: Computer networks are systems that allow computers and other digital devices to…
Q: What data may be found in the interrupt vector table's individual entries?
A: Data: In general, data refers to any collection of facts or information that can be processed,…
Q: 3 Define Scheme procedures to simulate the logic dezsign given in the diagram in Figure 3. The…
A: Given Diagram:
Q: Q3 Measurements on call-failures in a Telephone Central Office (TCO) compiled over eight bimonthly…
A: i) Expected average and variance of the RV in each site, [E[x],V(x);E[y],V(y]]: To find the…
Q: What is the minimum number of gates the input signals might have to travel through to affect the…
A: The parallel computer architecture in which we have the multiple process that we run a single…
Q: Is there a software development priority? How can software development be improved?
A: Answer Yes, there can be a priority for software development based on various factors such as…
Q: In this discussion, please elaborate on the four features of continuous event simulation that you…
A: PERIODICAL EVENT SIMULATION: In a continuous event simulation, the specific variables substantially…
Q: Go to the online properties of three major IT firms (Cisco, Oracle, and Microsoft) and two more of…
A: Introduction: With the advent of software, security has grown to be a major cause of worry for…
Q: If you believe it's important for the computer, give us two reasons why. scientist who uses their…
A: Introduction Computer: A computer is an electronic device that can receive, process, and store data.…
Q: Download the sample Ratings.txt file from NUoodle and put it in the same directory as numbers.txt…
A: The C++ code is given below with output screenshot A sampleRatings.txt file is taken as example for…
Q: Pretend you're in head of the police in Kampala and your job is to reduce crime. Provide some…
A: Introduction: Artificial Intelligence (AI) is the ability of a computer or machine to think and…
Q: Explore the difficulties of web engineering's development, testing, and upkeep, as well as the…
A: Introduction Web Engineering: The process of planning, building, testing, and managing web-based…
Q: Pretend you're in head of the police in Kampala and your job is to reduce crime. Provide some…
A: Answer: How can we utilise AI in crime mitigation without harming us? AI is often used to identify…
ps: Python
Write a
For each word, check to see if the word is already in a list. If the word is not in the list, add it to the list.
When the program completes, sort and print the resulting words in alphabetical order.
Sample output
['Arise', 'But', 'It', 'Juliet', 'Who', 'already', 'and', 'breaks', 'east', 'envious', 'fair', 'grief', 'is', 'kill', 'light', 'moon', 'pale', 'sick', 'soft', 'sun', 'the', 'through', 'what', 'window', 'with', 'yonder']
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Write a program that replaces the name of each month with its three-letter abbreviation. Save it as months.py. a) Create a list. months = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'] b) Use a for loop to update and store each month with its three-letter abbreviation into a new list. c) Print the value of each month in a row separated by a '|' as displayed in the output example. d) Print the new list as displayed in the output example. e) Print the original list as displayed in the output example.Program - Python Make a dictionary, the student's name is the key (a string) and the student's test scores is the value (a list). So it should be a dictionary with six key value pairs in it. Here is data to use. Brian,94,89,92 Rachel,100,90,65 Jon,67.5,95,100 Brit,0,78,80 Greg,65,100,78 Andrea,55.5,67,79 Now print the dictionary data using a loop that starts with for key, value in.Modify the following program to read dictionary items from a file and write the inverted dictionary to a file: characters = {'Bugs':['Rabbit', 1940, 'boy'], 'Garfield': ['Cat', 1978, 'boy'], 'Tweety': ['Bird', 1942, 'girl'], 'Sandy': ['Squirrel', 1999, 'female']} print("Printing the original dictionary") print(characters) print("") def invert_dict(characters): inverse = dict() for key in characters: val = characters[key] for list_item in val: if list_item not in inverse: inverse[list_item] = [key] else: inverse[list_item].append(key) return inverse my_invert = invert_dict(characters) print("Printing the inverted dictionary") print(my_invert) Include the following: 1) The input file for your original dictionary (with at least six items).2) The Python program to read from a file, invert the dictionary, and write to a different file.3) The output file for your inverted dictionary.…
- Write a python program that reads the first n lines of a text file. Suppose you have a file with all these strings in a file. ========================================================= I love Python Programming.It is very easy to understand the code.It can code very hard problems easily in python code.Python programming is the best programming language. ========================================================= Input :2Output :I love Python Programming.It is very easy to understand the code. ========================================================= Hint(1):Use counter to control line number. Hint(2):Use function readlines() to store in a list and then use loop OR you can use readline() in a loop. Hint(3):You might need to use strip() functionثxercise 3: Write python program that reads from an input file “scores.txt” student test scores inthe range 0 – 100 and store these scores in a list. Your program should determine the numberof students having scores in each of the following ranges: 0-59, 60-79, 80-89, and 90-100.Display the score ranges and the number of students. (Hint: store the ranges as a list). If yourun your program with the following data:76, 89, 100, 95, 90, 100, 76, 100, 50, 67, 78, 89, 77, 89, 98Your output should be as follows:Number of students: 150-59 60-79 80-89 90-100===== ===== ===== ======1 5 3 6Your program should have at least these 3 functions:1. main(): displays the ranges and the number of students in each range2. readData(): reads data from input file into a list3. splitIntoRanges(): takes a list of scores and determines the number of studentsin each score rangeIn Python IDLE: how would I write a for loop to reverse the strings within a list? Original list below: [”hi”, “my”, “name”, “is”, “tom”] Output that I want below: [ “ih”, “ym”, “eman”, “si”, “mot” ]
- Make a program in python that reads from a file that is passed as a parameter, a list of words (1 word per line). These words will be a list of "forbidden words". Operation example:We call the program "program.py list.txt"The file "list.txt" contains the words:HellopYThon With the program running, if you copy the phrase "HELLO Sergi we like PYTHON" to the clipboard, it should modify this phrase in the clipboard and leave it as "**** Sergi we like******", so that when we paste, this second version is pasted.program7_1.pyWrite a Python program that creates a list of your friends. Start with an empty list and then use a while loop to add friends to the list. This loop should repeat until you leave a name blank. Report the size of your list. You forgot a good friend. If she is not in the list (let code decide), she should be inserted at the start of the list. Use a for loop to display the names of your friends on one line, separated by spaces. A friend has moved away. Remove this friend by name from the list. Sort the list in alphabetical order and use another loop to display your friends, sorted. Sample OutputEnter the first name of a friend or ENTER to quit PennyEnter the first name of a friend or ENTER to quit LennyEnter the first name of a friend or ENTER to quit KennyEnter the first name of a friend or ENTER to quit DennyEnter the first name of a friend or ENTER to quit BennyEnter the first name of a friend or ENTER to quitYou made a list of 5 friends.OOPS, you forgot to enter a very…In Python Write a function swap that swaps the first and last elements of a list argument.Sample output with input: 'all,good,things,must,end,here' ['here', 'good', 'things', 'must', 'end', 'all'] ''' Your solution goes here ''' values_list = input().split(',') # Program receives comma-separated values like 5,4,12,19swap(values_list) print(values_list)
- 1 - Write a Python function that will do the following: 1. Ask the user to input an integer that will be appended to a list that was originally empty. This will be done 5 times, meaning that when the input is complete, the list will have five elements (all integers). a. Determine whether each element is an even number or an odd number b. Return a list of five string elements "odd" and "even" that map the indexes of the elements of the input list, according to whether these elements are even or odd numbers.For example: if the input sequence is 12, 13, 21, 51, and 30, the function will return the list ["even", "odd", "odd", "odd", "even"].-python- Write a function called get_words that takes a list of words and a letter,and returns a new list, which only contains the words that don't have the given letter in them. For example, get_words(["cat", "dog"], 'o') should return ["cat"] and get_words(["cat", "bat"], 'a') should return an empty list.8.17 LAB: Filter and sort a list Write a program that gets a list of integers from input, and outputs non-negative integers in ascending order (lowest to highest). Ex: If the input is: 10 -7 4 39 -6 12 2 the output is: 2 4 10 12 39 For coding simplicity, follow every output value by a space. Do not end with newline. Use Python, please.