1. Modify the statistics program from this chapter so that client programs have more flexibility in computing the mean and/or standard deviation. Specifically, redesign the library to have the following functions: mean (nums) Returns the mean of numbers in nums. stdDev (nums) Returns the standard deviation of nums. meanStdDev (nums) Returns both the mean and standard deviation of nums. 2. Extend the gpasort program so that it allows the user to sort a file of ‒‒ COLD C 40 10:05 PM 4/30/2022
Q: Assume you're employed by Xesoft as a software quality engineer. You've given the project title…
A: i have to describes steps from beignning of project to end of project.
Q: Computer science Are there advantages and disadvantages to passing by reference or by value?
A: Introduction: We really transmit the memory address of that variable as pass-by-reference arguments.
Q: What is the sum of the following octal numbers? 143 + 765 + 246?
A: Here is the solution about the octal numbers:
Q: What makes a model prescriptive
A: Introduction: A descriptive model is used to illustrate how a system or other item interacts with…
Q: Question) Compute FIRST & FOLLOW Sets for the following grammar; F→ for( D; B; E) {S} D→ Tid | Tid,…
A:
Q: In Excel, what are the many options for data protection?
A: The Answer is in given below steps
Q: In terms of the number of encryption operations required to transfer a large file, compare cypher…
A: Interrupts enable devices to tell the CPU when data needs to be sent or when an operation is…
Q: Employee Graph = (V,E) V(EmployeeGraph) = { Susan, Darlene, Mike, Fred, John,…
A: The above question is solved in step 2:-
Q: How about some real-world examples of software maintenance techniques?
A: Software maintenance techniques are of multiple types.
Q: Which sorting algorithm uses the most amount of space to sort a sequence on n elements? A. Selection…
A: => here in the question ask that which algorithm use the most amount of space to sort a sequence…
Q: What the major differences are between object oriented programming and object oriented data model.
A: Differences: 1) Object oriented programming (OOP) is a computer programming model that organized…
Q: You've been asked to prepare and present a case to nontechnical management for hiring a system…
A: Introduction Given that we have been asked to prepare and deliver a presentation to a non-technical…
Q: How can you defend Microsoft Access's superiority in data handling when compared to Microsoft Excel?
A: Introduction: Microsoft Excel is used to displays the data in horizontal and vertical rows. The…
Q: List and define the ideal properties of a cryptographic hash function.
A: Definition: Cryptographic hash function: A cryptographic hash function is a hash function that may…
Q: Two computer scientists-turned-farmers are planning what and how to plant during the upcoming…
A: Answer:- When establishing a brand new date plantation, sure actions got to be enforced to make sure…
Q: 6) Weight Formula: Weight is not anything but the force which an object experiences due to gravity.…
A: Start Accept mass Accept gravity Calculate Weight W Print Weight W Stop
Q: fits of using a spreadsheet solution and the simplicity with which data was processed to create the…
A: Excel is a spreadsheet created by Microsoft for Windows, macOS, Android and iOS. It features…
Q: SET reg, immed; 3 clock cycles LOAD reg, mem ; 4 clock cycles ADD reg, reg ;3 clock cycles ADD reg,…
A: The answer is
Q: What distinguishes an embedded computer from a general-purpose computer?
A: Introduction: This question falls under the subject of computer architecture in the field of…
Q: I am trying to transition into this webpage you see the link too. The page switches to that link but…
A: I will provide u with the idea of how this works through the screenshots applying the same for all…
Q: In an ancient land, the beautiful princess Eve had many suitors. She decided on the following…
A: Iam using list instead of vector. c++
Q: Are you aware of how Amazon and other disruptive technologies and applications became possible as a…
A: Introduction: Disruptive Technology: Disruptive technology is either a game-changing innovation that…
Q: there a reason to believe that a single programming language is a good idea
A: A single language's would ease whole programming requirements & create standardizes way for…
Q: Why is it necessary to create a software specifically for debugging?
A: To use GDB's variables and types, any application must be built and packed with debug information.…
Q: // Program describes two files // tells you which one is newer and which one is larger import…
A: Solution :: Code: import java.nio.file.*; import java.nio.file.attribute.*; import…
Q: Construct a Turing Machine that accepts the language L defined as follows: L = { w: num, (w)…
A: The purpose of a Turing machine: A Learning algorithm is a computer model that reads and writes to…
Q: How do main and secondary storage vary in terms of performance and cost?
A: Primary/Main memory: Primary memory is the PC memory that is straightforwardly available by CPU. It…
Q: Parking Ticket Simulator For this assignment you will design a set of classes that work together to…
A: The below program is solved using C++ Language:
Q: JAFO Atypical 1.5 V battery has a capacity of 28 mAh. Assume that this battery is used to operate a…
A:
Q: Today's businesses use big data as an integral part of their IT infrastructure. What are the…
A: The solution to the given question is: BENEFITS OF BIG DATA Big data analytics leads to innovative…
Q: Why is it vital to understand how firewalls work?
A: Answer : It very important to understand how firewall work the reason behind it is Firewall is a…
Q: Give pseudocode for computing a join
A: Algorithm for Natural JoinFor doing Natural join, the relation R(A, B) with S(B, C), it is required…
Q: Program a class representing a player hand. The hand should be unbounded in size. A hand should have…
A: The program implementation is implemented below:
Q: JAVA Using interfaces we can specify similar behaviors for possibly disparate classes.…
A: Below is the code:
Q: Which encryption standard ensures the integrity of data during transmission and reception?
A: Here's the solution: Message integrity is another fundamental idea in cryptography. While encryption…
Q: javaaa Write a class with a constructor that accepts a String object as its argument. The class…
A: According to the Bartleby guideline we are suppose to answer only one question at a time. Kindly…
Q: Consider the following data sets comprising of 3 boolean input attributes and 1 boolean -output.…
A: Note : Answering the question in python as no programming language is mentioned. Task : Import the…
Q: Consider the significance of wireless networks in today's developing countries. In many regions,…
A: Given: Consider how important wireless networks are in today's developing nations. Wireless…
Q: Do you know of any successful ways to maintain a firewall? Explain
A: A firewall is a omputer network security framework that limits web traffic in, out, or inside a…
Q: What advantages does the data flow approach have over narrative explanations?
A: Introduction: The data flow method is a diagrammatic description of information movement and…
Q: Write a C++ program to convert temperature in degrees Fahrenheit to degrees Celsius. Your program…
A: Algorithm for temperature conversion Declare variable temp and insert temperature in Fahrenheit .…
Q: QUESTION 2 #include using namespace std; int main() { int x2, a[3] (3,2,1); cout <<a[1/2] << endl;…
A: The above code is written in C++ And and output is below:
Q: When it comes to creating a botnet, what are the steps involved?
A: INITIATION: Another way, a botnet is a collection of infected computers that an evil actor has taken…
Q: 6.18 Lab: Flip a Coin Define a method named coinFlip that takes a Random object and returns "Heads"…
A: As Language is not defined doing it in Java Language:
Q: What are ANN? Explain in details?
A: The solution to the given question is: ARTIFICIAL NEURAL NETWORK Neural Network are a set of…
Q: Laboratory Activity 3 Laboratory Activity 3 Number of Hours: Years of Service: 0 1 Year O 2 to 3…
A: Create a HTML page that will output below Using forms create the page The HTML <form>…
Q: Computer Science 4) A person can have more than one credit card, but a credit card can only belong…
A: I created a text file with 15 names (some repeated), each with unique card numbers. The contents of…
Q: In RSA, given that the primes p and q are approximately the same how big is $(n) compared to n?…
A: Answer In RSA, we have: n = p*q [where p and q are prime number] ϕ (n) = (p-1)* (q-1) In RSA, the…
Q: In what ways does Amazon Web Services help Netfilx as an informati
A: The answer is
Q: What are the different kinds of malware? What distinguishes worms from viruses? Are Trojan horses…
A: - We are talking about mlawares, difference between virus and worms and trojan horses.
Step by step
Solved in 2 steps with 2 images
- 1) What is the purpose of the code below? 2) What is each function used for in the code? 3) What are the names of the parameters/ arguments and what are they responsible for? 4) Why did you use a while loop in you code? 5) How did you accomplish the sort() to sort numbers? Code: #predefined modulesimport randomimport math #function to sort the list in ascending orderdef sort(x): #predefined function sort() x.sort() #print the sorted list print("\nSorted list is: ",str(x)) #function to find the sum of list elementsdef sum_of_list(x): #predefined function sum() Sum=sum(x) #return the sum of list elements return Sum #function to list the maximum from the listdef list_max(x): #predefined function max() maximum=max(x) #return maximum return maximum #function to test the above three functiondef main(): #set a flag variable flag=True #create a list list1=list() #initialize the list element by using randrange() predefined function of…I have done this question, but I feel like for some lines, they were supposed to be changed would you be able to help me with that? Consider the following function and attempted body."""from typing import TextIOdef allergy_checker(shopping_lists: TextIO,clean_shopping_lists: TextIO, allergies: list[str]) -> None:'''shopping_lists is a file open for reading that has at least one food name on everynon-blank line. Food names are separated by a space.Each line in shopping_lists ends with a newline character.clean_shopping_lists is a file open for writing.allergies is a list of one-word food names.Copy lines from shopping_lists to clean_shopping_lists.For each food name that is in the allergies list, replace it with 'REMOVED'.If a blank line in shopping_lists is reached, stop reading the file.'''shopping_lists = open(shopping_lists) # Line 1clean_shopping_lists = open(clean_shopping_lists, 'w') # Line 2line = shopping_lists.readline() # Line 3while line.strip(): # Line 4line =…Write a function MedianWithoutHL(ScoreList) that takes an unsorted list of n numbers as a parameter, discards the highest and the lowest numbers and return the median. You can assume the number of items in the list is between 0.0 and 9.9. To find the median from a list of items, you have tosort the list and find out the value of the item in the middle.Note: If the list has an odd number of items, the median is the value of the middle item. If the list has an even number of items, the median is the average of the two middle items.Sample Run #1:scoreList1 = [9.0, 9.0, 7.5, 8.0, 9.5, 6.5, 5.0, 7.0, 7.5, 8.5]print("The Original ScoreList: ", scoreList1)print(MedianWithoutHL(scoreList1))Output of Sample Run #1:The Original ScoreList: [9.0, 9.0, 7.5, 8.0, 9.5, 6.5, 5.0, 7.0, 7.5, 8.5]The List after sorting: [5.0, 6.5, 7.0, 7.5, 7.5, 8.0, 8.5, 9.0, 9.0, 9.5]Without the High & Low: [6.5, 7.0, 7.5, 7.5, 8.0, 8.5, 9.0, 9.0]7.75
- (Numerical) Write a program that tests the effectiveness of the rand() library function. Start by initializing 10 counters to 0, and then generate a large number of pseudorandom integers between 0 and 9. Each time a 0 occurs, increment the variable you have designated as the zero counter; when a 1 occurs, increment the counter variable that’s keeping count of the 1s that occur; and so on. Finally, display the number of 0s, 1s, 2s, and so on that occurred and the percentage of the time they occurred.def thing2(lst: List[int]) -> None: """TODO: Enter your description of the runtime complexity of this function below, after the phrase Runtime:. Use one of the descriptions: constant, linear, quadratic, or 'something else' Runtime: enter answer here* Precondition: len(lst) > 0 """ n = len(lst) if n == 1: helper(lst) else: helper(lst[0:1]) def thing3(lst: List[int]) -> None: """TODO: Enter your description of the runtime complexity of this function below, after the phrase Runtime:. Use one of the descriptions: constant, linear, quadratic, or 'something else' Runtime: something else Precondition: len(lst) > 0 """ n = len(lst) i = 0 while i < n * n: helper(lst) helper(lst) i = i + nYou are tasked with helping write part of an exciting new word-guessing game, “Durdle”. The game is one in which a player attempts to guess a five-letter word in successive guesses. In this problem and the next one, we will build an implementation of this word-guessing game. First, to support this game, we will write a function named durdle_match(guess, target) that takes in two strings - a player’s guess, and the target word that the player is attempting to guess. Each of the given words is five letters long. This function should return a five-letter string consisting of the letters B, G, and Y that has a meaning associated with the guess as follows: B: This letter in the guess does not appear in the target string Y: This letter in the guess appears in the target string in another location G: This letter in the guess appears in the same location in the target string
- Look at the differences between max1 and max22. What is the difference?3. Do the two functions do the same amount of computation?4. If so, do you think that the two functions will run in the same amount of time? #include <stdio.h>#include <time.h>#include <stdlib.h> // For the assignment, be sure to run unmodified code, but you are free to // play around with the code to try out different parameters or different// implementations. // arrs is a 16384 element array of 256 integer arrays (a 2D array)// each function is run 50 times (numiters) in order to increase the runtime// into the range of seconds (which is the time printed) int max1(int** arrs, int narrs, int arrlen) { int max = 0; for (int i=0; i<narrs; i++) { for (int j=0; j<arrlen; j++) { if (arrs[i][j] > max) max = arrs[i][j]; } } return max;} int max2(int** arrs, int narrs, int arrlen) { int max = 0; for (int j=0; j<arrlen; j++) { for (int i=0; i<narrs; i++) {…Your task is to implement a variation of the classic word game Hangman, which involves players guessing the letters in a word chosen at random with a finite number of guesses. While there are alternate versions such as category Hangman and Wheel of Fortune, which involve players guessing idioms, places, names and so on, we will be sticking with the traditional version. Requirements:You will implement a function called main that allows users to play an interactive hangman game against the computer. The computer should pick a word, and players should then try to guess letters in the word until they win or run out of guesses.Here is the overarching behaviour we expect:1. The program should load a list of available words from the text file provided. Note that the file you have been given contains words in lowercase.2. The computer should then select a word at random from the list at random.3. The user is given a certain number of guesses at the beginning.4. The game is interactive; the…Give solution in C ++ Language with secreenshoot of source code. Part 01In this task, you need to do the following:• Write a function named displayMessage() that takes user name as input in character array and then shows greetings• Now take the name input in main() and pass the name as an argument to displayMessage() function• Change the displayMessage() method such that it returns the number of characters after displaying the greetings part 02Write a function power that takes two parameters a and b. And it returns the power as ab.
- A supermarket wants to reward its best customer of each day, showing the customer’s name on a screen in the supermarket. For that purpose, the customer’s purchase amount is stored in a list and the customer’s name is stored in a corresponding list. Implement a function nameOfBestCustomer that returns the name of the customer with the largest sale. def nameOfBestCustomer(sales, customers) Write a program that prompts the cashier to enter all prices and names, adds them to two lists, calls the function that you implemented, and displays the result. Use a price of 0 as a sentinel. Make sure that you use functions in your solution, including a main function.Your task is to implement a variation of the classic word game Hangman, which involves playersguessing the letters in a word chosen at random with a finite number of guesses. While there arealternate versions such as category Hangman and Wheel of Fortune, which involve playersguessing idioms, places, names and so on, we will be sticking with the traditional version. Requirements:You will implement a function called main that allows users to play an interactive hangman gameagainst the computer. The computer should pick a word, and players should then try to guess lettersin the word until they win or run out of guesses.Here is the overarching behaviour we expect:1. The program should load a list of available words from the text file provided. Note thatthe file you have been given contains words in lowercase.2. The computer should then select a word at random from the list at random.3. The user is given a certain number of guesses at the beginning.4. The game is interactive; the user…Please answer it in Python Write a palindrome function that takes a word as an argument and returns a Boolean indicating whether the word is a palindrome. A palindrome is a word that remains the same when read from right to left instead of the usual order from left to right. Example: palindrome('here') is True but palindrome('go') is False. Write a function word_allows taking as an argument a word and a list of forbidden words, and returning True if the word is allowed, and False if the word is prohibited. Example: word_allows('fric', ['sous', 'fric', 'thune', 'ble']) is False word_allows('silver', ['sous', 'fric', 'thune', 'ble']) is true