fr 3 File Edit Format Run Options Window Help import random def contents (filename): with open (filename) as f: return f.read() def random_word_in_file (filename): punctuations()-[1;;'"\,<>?@#$#*_will words contents (filename0.split() random_word=random.choice (words) = for i in random_word: if i in punctuations: random_word random_word.replace(i, "") return random_word def main (): print ("The random word is:", random_word_in_file("dictionaty.txt" main () SyntaxError Xinvalid syntax OK X
Q: Explain how inline functions differ from normal functions when called in the background
A: inline functions differ from normal functions when called in the background explained in next…
Q: Robots may be programmed to do tasks that humans may find harmful, offensive, or tedious. I'd want…
A: Given: People get tired of doing the same thing over and over after a while. As time goes on, we…
Q: Create a list of four obstacles to healthy hearing, two external and two internal.
A: Hearing loss, which can range in severity from minor to profound, is the partial or total loss of…
Q: It is unknown how to ensure that each IPsec-using machine uses a unique set of private keys.
A: The question has been answered in step2
Q: What ethical and social impacts do robots and Al have? Would making all jobs robot-friendly make our…
A: Introduction: Computer science's field of artificial intelligence involves writing computer…
Q: What are the advantages of using hash index tables?
A: ANSWER:-
Q: To what extent does SIMD benefit from data or control parallelism? Where does MIMD shine in terms of…
A: Program-level parallelism refers to the practice of distributing a single program such that it may…
Q: Human rights-based science, technology, and development may be the cornerstone of sustainable…
A: Natural occurrences are studied by physical sciences. Then a mathematical model is built. The model…
Q: What ethical and social impacts do robots and Al have? Would making all jobs robot-friendly make our…
A: The answer of the question is given below
Q: With the convergence of physical and digital worlds and intelligent technologies, will we have a…
A: Are we on the verge of experiencing a problem with personal privacy as the real and digital worlds…
Q: Microsoft and Sun have engaged in a number of public disagreements about the design of Microsoft's…
A: Please find the answer below :
Q: Are you more drawn to a command line interface than a picture-based one? Why?
A: Over GUIs, CLIs often have a number of advantages. They tend to be faster in the first place since…
Q: If Al has inherent prejudice, how can we fix it? What methods exist for making Al less prejudiced?
A: Given: AI bias is an abnormality in machine learning algorithm output caused by biased algorithm…
Q: Describe an useful application of the no-access page facility provided in Windows XP?
A:
Q: operate? Provide at least two different EAP options in your d
A: Introduction: EAP is an authentication framework for delivering and utilising content and parameters…
Q: Discuss the advantages and disadvantages of guaranteeing reliable transfer of data between modules…
A: any place where input comes from or where output goes. For example using the keyboard as input and…
Q: Discuss data manipulation, forgery, and web jacking, providing an example of each
A: data manipulation They were modifying or changing data to make it more readable and organized. It…
Q: ects of information system architecture contribute to scope cree
A: Introduction: A project's scope is its specified work plan and deliverables. It describes the…
Q: Describe an useful application of the no-access page facility provided in Windows XP?
A: Click the Start button to launch Windows XP's exploration mode. The Start menu shows when you click…
Q: Explain the distinction between qualities and variables in a three-page long analysis
A: The Answer start from step-2.
Q: What moral concerns do you anticipate arising as a consequence of society's increasing reliance on…
A: The field of artificial intelligence has come a long way in a short time. Today's AI systems can…
Q: How does reloading a service vary from restarting it?
A: Find Your Answer Below
Q: This variable defines the number of instructions necessary to execute each statement at the source…
A: The following factors influence the program's performance: - The algorithm decides the number of…
Q: Exactly what does it imply when we talk about the "software scope?"
A: Given: The bounds of software are well defined. This category includes everything that is done to…
Q: What are the four pillars around which extreme programming is built?
A: Extreme programming which refers to the programming languages it is the software development…
Q: Flynn's taxonomy should be expanded by one level for us. What distinguishes more advanced computers…
A: Parallel computing is computing where tasks are divided into separate parts that can be executed…
Q: Which techniques are the most successful for assuring the resilience and availability of a LAN…
A: The answer of the question is given below:
Q: Describe the technologies and techniques used to define project management in the IT industry.
A: The Answer start from step-2.
Q: When the intruder has access to only the intercept cipher-text, with no certain information about…
A: Q2 answer is an Intrusion Prevention System explanation : Intrusion prevention systems are also…
Q: To what extent does SIMD benefit from data or control parallelism? Where does MIMD shine in terms of…
A: Introduction Control parallelism alludes to the simultaneous execution of various guidance streams.…
Q: This variable defines the number of instructions necessary to execute each statement at the source…
A: A variable is used to store an element with particular name, by which one can identify the value.…
Q: How do science and technology effect our lives? How can we defend human rights with cutting-edge…
A: In the current global context, numerous potent technologies have been developed to assist…
Q: It is unknown how to ensure that each IPsec-using machine uses a unique set of private keys.
A: Given: The use of Digital Certificates in conjunction with IP sec makes it possible to mandate the…
Q: In your perspective, which of the following uses of AI in the workplace is the most important?…
A: Artificial intelligence (AI) and deep learning artificial intelligence (DLAI) are rapidly expanding…
Q: Microsoft Excel provides some alternatives to consider. Provide an explanation of how the following…
A: Given: The sorting and filtering tools in Excel's built-in apps are among the best for helping with…
Q: Specify what you mean by "unit-by-unit testing, and provide an example
A: A unit is the smallest testable part of an application/software. It may be an individual function,…
Q: Contrast and compare two market-available hypervisors in terms of how they virtualize and control…
A: Hypervisor PC programming, firmware, or hardware that creates and manages virtual machines may be…
Q: Discuss what techniques could be used to meet quality of service re- quirements for multimedia…
A: Discuss what techniques could be used to meet quality of service re-quirements for multimedia…
Q: Which protocol—SSL or TLS—is used to secure browser-to-webserver connections?
A: HTTPS is the Hypertext Transfer Protocol Secure. It ensures the confidentiality of communications…
Q: Why was the RISC architecture first proposed?
A: Simple RISC instructions just need one word to be stored in memory: The opcode and the operands of…
Q: Why not explore programming methods? Why are there so many paradigms? Really? Please clarify.
A: Programming languages have pushed the boundaries of what programming may be and what types can mean…
Q: What other variables may be modified to keep the same page size (and hence avoid rebuilding the…
A: variables may be modified: The "global" keyword is used inside of a function to change a global…
Q: Suppose the game is programmed so that the computer uses a binary search strat- egy for making its…
A:
Q: can you seperate the code from the description as it is a beat confusing thank you
A: Your separate code from the description is given below.
Q: When it comes to creating software, how closely related are the concepts of cohesion and coupling?
A: Definition: Understanding a module's internal mechanism is the foundation of cohesion, whereas…
Q: Detail the software structure review method using examples.
A: the answer of the question is given below
Q: Modular and procedural programming ideas.
A: We have to discuss about Modular programming approach, a popular fundamental approach used in…
Q: distinguishes more advanced computers from other sorts of computers?
A: Flynn's taxonomy expanded and distinguishes more advanced computers from other sorts of computers…
Q: d) Consider a 15bit address in high-order interleaving, determine the bank and offset value from the…
A:
Q: Why not explore programming methods? Why are there so many paradigms? Really? Please clarify.
A: the answer of the question is given below
Please help me fix the error in this code
Step by step
Solved in 2 steps
- C programming language Criteria graded: Declare file pointers Open file Read from file Write to file Close file Instructions: Write a segment of code that opens a file called “numbers.txt” for reading. This file is known to have 10 numbers in it. Read in each number and print a ‘*’ to the screen if the number is even. If the number is odd, do nothing. Conclude by closing this file.Searching - a user should be able to search by ID or by item name create only one menu item for searching a user should be able to enter the name of the item using any case, (for example, sTRolleR) you may wish to store items in all lower/upper case to expedite the search write one search function that can search by ID and name and goes through the array of structs/objects only once show the entire record if found or an appropriate message if not Sorting - sort by any field write one function to sort by any field using a parallel array of pointers use Bubble Sort is not the most effective but the easiest to modify. do not copy and paste sort code five times into the same function. sorting using pointers is faster because you have to swap pointers only, which are normally stored in 4 bytes each; it also allows you to preserve the original order of the items If you choose to have a submenu, a submenu must have an option to go back to the previous menu or main menu if a user got…C Sharp Random Number File writer Create an application that writes a series of random numbers to a file. Each random number should be in the range of 1 through 100. The application should let the user specify how many randome numbers the file will hold and should use a SaveFileDialog control to let the user specify the file's name and Location.
- Problem: Write a Python program that reads from an input file named employees.txt some employee information and produces a salaries report on screen. The input file employees.txt has a number of data lines. Each data line in the input file contains information about one employee including: first name, last name, job code (an integer between 1 and 4), and the number of days worked. The following is an example of what the input file employees.txt can contain: Ali Al-Harthi 22 Laila Al-Busaidi 4 25 Salim Al-Hajri Badria Al-Sinani 2 21s 19 Abir Al-Hinai 1 15 Your program should produce a salaries report on screen using the format shown below. Enter input file name: employee.txt Name Job Code Days Worked Salary (OMR) Ali Al-Harthi 3 22 660.000 Laila Al-Busaidi 4 25 637.500 Abir Al-Hinai 15 600.000 Number of faulty records = 2 Number of valid records = 3 Average salary = 632.500 The salary of each employee is equal to the number of days worked multiplied by the daily pay rate. The daily pay…Word List File Reader This exercise assumes you have completed the Programming Exercise 7, Word List FileWriter. Write another program that reads the words from the file and displays the following data:• The number of words in the file.• The longest word in the file.• The average length of all of the words in the fileC++ Visual Studio 2019 Write a program that asks the user for the name of a file. The program should display the contents of the file on the screen. Each line of screen output should be preceded with a line number, followed by a colon. The line numbering should start at 1. Here is an example: George Rolland 127 Academy Street Brasstown, NC 28706 If the file's contents won't fit on a single screen, the program should display 24 lines of output at a time, and then pause. Each time the program pauses, it should wait for the user to strike a key before the next 24 lines are displayed. Note: Save text below as the file to use and name it forChap12.txt file for this assignment. The line numbers should NOT be reset for each screen. Text: No one is unaware of the name of that famous English shipowner, Cunard. In 1840 this shrewd industrialist founded a postal service between Liverpool and Halifax, featuring three wooden ships with 400-horsepower paddle wheels and a burden of 1,162 metric…
- Random Number File Writer Create an application that writes a series of random numbers to a file. Each random number should be in the range of 1 through 100. The application should let the user specify how many random numbers the file will hold and should use a SaveFileDialog control to let the user specify the file’s name and location.In C# create an application that writes a series of random numbers to a file. Each random number should be in the range of 1 through 100. The application should let the user specify how many random numbers the file will hold.C Sharp Random Number File writer and Reader Create an application that writes a series of random numbers to a file. Each random number should be in the range of 1 through 100. The application should let the user specify how many randome numbers the file will hold and should use a SaveFileDialog control to let the user specify the file's name and Location. Create another application that uses an OpenFileDialog control to let the user select the file that was created above. This application should read the numbers from the file, display the numbers in a ListBox control and display: the total of the numbers and the number of random numbers read from the file.
- The starter file: def main():# Add code that reads the file n_pets.txt,# computes the total number of pets,# the average #, the minimum #, and the maximum ## and displays those numbers as specified in the instructions.main() The data file: 24632341355114422Rectangle's Length and Width Code in C language // WARNING: Do not add, remove, or change anything before the line 19 of this file.// Doing so will nullify your score for the activity. #include <stdio.h>#include "rectangle.h" int get_length(Rectangle *rect);int get_width(Rectangle *rect); int main() { int ur_x, ur_y, ll_x, ll_y; printf("UR's X: "); scanf("%d", &ur_x); printf("UR's Y: "); scanf("%d", &ur_y); printf("LL's X: "); scanf("%d", &ll_x); printf("LL's Y: "); scanf("%d", &ll_y); // TODO: Initialize the points here // Point ... // TODO: Initialize the rectangle here // Rectangle ... // TODO: Call the get_length here int len = ___; printf("\nLength: %d", len); // TODO: Call the get_width here int wid = ___; printf("\nWidth: %d", wid); return 0;} // TODO implement get_lengthint get_length(Rectangle *rect) { return 0;} // TODO implement get_widthint get_width(Rectangle *rect){ return 0;} refer to pics for instructionspython function that creates and saves data in a file. the saved data represents exam grades. in the function , you will create n random numbers in the range 1-100, where n is the number of students. The function can be called as follows: createFile(filename, n) main function, in which the user inputs the file name and the number of students, then the main calls function createfile. the main should preform validation for n (should be > 0), and the filename(should end with .txt)