osts are Store onstant) lists: ITEMS = ["Beans", "Rice", "Banana", "Ice", "Tea", "Bread", "Orange", "Sugar"] PRICES = [3.25, 4.31, 6.88, 3.3, 5.25, 4.89, 6.32, 2.25] should implement the following functions to print a cost table. make_cost_table). Called by the main() function, this function will prompt the user for the maximum quantity (between 1 an orientation of the table (item\qty as horizontal). It will handle the user input error. Once valid values are obtained from the us next function to build the string that contains the formatted cost table, and return it. build_cost_table(items, prices, max_qty, horizontal). This function will build and return a string that represents the cost table cost of buying that item for a quantity from 1 to the max_qty. If horizontal is True, each row is for one item and each column otherwise, each row will be for each quantity and each column is for each item. You must use nested for loops to build the c
Q: An authorized of an information system is attempting log in, but has forgotten the password for his…
A: IDS is an Intrusion Detection System which is used to monitor suspicious behavior for the sake of…
Q: By inspecting the LSB, you may quickly determine if a bit stream represents an odd or even decimal…
A: Everything is represented in machines in terms of bits. A bit is capable of storing either 0 or 1.…
Q: Cite advantages and disadvantages both for serial and parallel data transfer
A: 1. For moving information between PCs, workstations, dual-use techniques, specification, Serial…
Q: Write an Octave function (i.e. write the code you would put in an Octave .m file) that takes a…
A: Answer
Q: 1. Write a short program that uses a math module function to display the square root of 100.
A: Note: In the question didn't mention the programming language so here im using the c language Code :…
Q: Selecting any free antivirus is a difficult task. When you compare an additional Free Malware…
A: Malware: Computers, servers, clients, and networks can be disrupted by malware. Malware is any…
Q: To convert int to String we use Integer.toString()
A:
Q: How should you generally go about making changes to the registry?
A: The Registry: An Overview In Microsoft Windows 98, Windows CE, Windows NT, and Windows 2000, the…
Q: Provide your thoughts on "time-variant" and "time-invariant" Data Base systems, as well as some…
A: Data Base Systems: Database Systems, often known as Database Management Systems or DBMS, is…
Q: Assumptions about cybercrime are as follows:
A: Cybercrime: Any criminal conduct using computers or the internet is referred to as cybercrime.…
Q: Please write down the output of following code: ArrayList list = new ArrayList(); list.add("10");…
A: As given, we need to write down the output of the given code. Given code - ArrayList<String>…
Q: To guarantee that the user's memory load is maintained to a minimal, what can a system designer do?…
A:
Q: Using less media for the same data storage capacity is a benefit of blocking a tape. How so??
A: According to the question magnetic tape drives and the floppy disk drives and the hard disk drives…
Q: Write a C++ program that determines if an integer array is a palindrome. Declare two pointers to the…
A: Palindrome Palindrome is a number or word that can be read same from backward and forward direction.…
Q: Put differently, if I am on a private subnet with IP 10.0.0.89/24, how is traffic sent and received…
A: Given that the user has a private subnet we have to find how traffic is sent and received from…
Q: In reality, information is saved in a database that can be accessed by a web browser, correct?
A: answer is
Q: Define RS232 and its applications
A: RS232 is a serial communication protocol that was developed by EIA (Electronics Industry…
Q: What exactly is a data model, and what does it do? What is conceptual modeling, and how does it…
A: Answer
Q: When a corporation uses extranets, what are the strategic and competitive advantages that you see?
A: Definition: Getting a competitive advantage is the key to success in today's global market. An…
Q: offered an example of a legitimate-looking phishing email that would entice recipients to click on a…
A: Phishing: Phishing is a type of attack frequently used to steal user information such as login…
Q: For the above given signal each bit is separated by a vertical line. If duration of a bit is given…
A: Answer
Q: What are some of the drawbacks of moving to an enterprise-level analytics solution for end users who…
A: drawbacks of moving to an enterprise-level analytics solution for end users who are used to dealing…
Q: Q2/ write the schema that descibes the following relations: 1- The course relation course id title…
A: Drawing the schema for given relation Here, PK means Primary Key and FK means Foreign Key.
Q: Asymmetric multiprocessing systems are preferred nowadays by many computer users (individuals and…
A: Asymmetric multiprocessing systems are preferred nowadays by many computer users (individuals and…
Q: Moore: Why does he believe he can talk about ICs? What does debugging mean? What does the phrase…
A: The Incident Command System (ICS) is an exceptionally normalized, hierarchical, military-based…
Q: 8.00 programming Howchart to given namber Draue print 900 a Multip lice tion tablk for Wing 00 - wer…
A:
Q: What are the main procedures to follow if you want the computer to look for operating system boot…
A: The Answer is in step2
Q: If you were writing code for a real-time operating system, how would you go about designing it? If…
A: Real-time operating system (RTOS) Operating System in Real TimeReal-time operating systems vary from…
Q: .Ccoraing to the following tion data for a chioride lon selective electrode. Sample Conc. pCl- Avg.…
A: First word written their which got cut is THE.
Q: Using two instances, describe the reason behind cryptography and the fundamental concepts of the…
A: CRYPTOGRAPHY'S PURPOSE: The tool used to secure data transmission between computers. Using…
Q: How can Al assist in the creation of databases? What are the advantages and disadvantages of…
A: Disadvantages: Advantage is a situation, scenario, opportunity, or method that is especially…
Q: Given: String[] name={"John", "Mary", "Jim", "Sam"}; Which one is correct: name[1]="Mary"…
A: 1) Code snippet in question declare and initializes a string array String[] name = {"John", "Mary",…
Q: Q13: Write C++ program to find e from the following serles: e=1+(1/10+ (1/21)+ (1/31) .+ (1/nl)
A: We initialize it with 1 Then, for second term, it is 1/10 From next it is 1/10*i+1
Q: Write a program for sorting an unsorted Array. Use merge sort algorithm comprising recursive…
A: I give the code in C++ along with output and code screenshot
Q: Write a program that checks matching words - First asks the user to enter 2 String variables word1…
A: Note: The program has been provided in Java. Java has two methods to compare strings.…
Q: How do you tell the difference between backing up a database in a sequential fashion vs a single…
A: Incremental backup only includes the data : Distinguish between sequential file and database backup…
Q: What are some examples of network architectures?
A: According to the information given:- We have to give some examples of network architectures?
Q: To what extent has the present state of computer security been influenced by past alterations in…
A: Introduction: Cybersecurity, also known as information technology security, is the act of preventing…
Q: What are some of the most significant benefits of the client/server design when compared to…
A: A special type of computing model inside which all the resources are delivered and managed by the…
Q: What are the four main reasons why people collaborate? Name and define them, as well as their…
A: Collaboration System - In this case, the computer system that is used by many or a lot of businesses…
Q: now the four stages of netwo
A: Bellow the four stages of network growth??
Q: In a workplace with shared resources like a printer, how do you handle security?
A: Shared resources are equipment that may be accessed remotely by numerous computers linked through a…
Q: What are some of the questions that need to be addressed if an information system is not integrated?
A: A design of an unintegrated information system in which each business function areas have its…
Q: Is it feasible to use optical discs that can be written to again? Disc rewrites are possible, but…
A: Rewritable discs represent the next phase in media development. CDs and DVDs are analogue storage…
Q: What exactly is OWASP Zed Attack Proxy (ZAP) (previously WebScarab)? What kind of security tests can…
A: OWASP Zed Attack Proxy :- It's one of the most widely used security tools in the world, thanks to…
Q: Construct Turing machines that will accept the following languages on (a, b}: L = {a"b"a"b":n 2 0}
A:
Q: Q#2: Convert the code into descriptive code, and verify using White Box Testing. int main() { int i,…
A: Please refer below code : Applying white box testing and firstly writing the descriptive code: 1.…
Q: Software modeling and software development are two distinct processes. What is the difference?…
A: let us see the answer:- Introduction:- Individual modules/components are designed in software…
Q: write the differences between voice voders and wave coders .Give the names and proterties of the…
A: Speech coding Speech coding is a process of obtaining compressed form of speech signal. It allows…
Q: ny Delight's many
A: An incredible level of pleasure or satisfaction: bliss youngsters screaming with merriment also:…
Step by step
Solved in 2 steps with 3 images
- 1. Write a function called chop that takes a list, modifies it by removing the first and last elements, and returns None. For example: >>> t = [1, 2, 3, 4, 5, 6] >>> chop(t) >>> t [2, 3, 4, 5] 2. Write a function called list_median that takes a list and returns a new list. If the list has even numbers of elements, the new list will have two elements. If the list has odd numbers of elements, the new list will include only one element. For example: >>> t1 = [5, 1, 2, 3, 4] >>> list_median(t1) [3] >>> t2 = [8, 3, 10, 6] >>> list_median(t2) [6, 8] 3. Write a function called has_duplicates that takes a list and returns True if there is any element that appears more than once. It should not modify the original list. For example: >>> t1 = [5, 1, 2, 3, 4] >>> has_duplicates(t1) False >>> t2 = [5, 1, 2, 3, 2, 8, 10] >>> has_duplicates(t2) True10.20 LAB: Multiples of ten in a list Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples of 10, or mixed values. Define a function named is_list_mult10 that takes a list as a parameter, and returns a boolean that represents whether the list contains all multiples of ten. Define a function named is_list_no_mult10 that takes a list as a parameter and returns a boolean that represents whether the list contains no multiples of ten. Then, write a main program that takes an integer, representing the size of the list, followed by the list values. The first integer is not in the list. Ex: If the input is: 5 20 40 60 80 100 the output is: all multiples of 10 Ex: If the input is: 5 11 -32 53 -74 95 the output is: no multiples of 10 Ex: If the input is: 5 10 25 30 40 55 the output is: mixed values The program must define and call the following two functions. is_list_mult10() returns true if all integers in the list are…1. Write a function called `CleanString` that takes one argument, an accounting number formatted as a string, and returns the number as a float. For example, if the argument is the string '$(7,074,619)', the return value should be the float -7074619. This function should be created in the first code cell below. 2. Iterate over the list `data` and "apply" the function `CleanString` to each element of the list. Save the result to a new list, `cleandata` (this iterating should be completed in the second code cell below).
- 5.16 LAB: Adjust list by normalizing In the language C When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by dividing all values by the largest value. The input begins with an integer indicating the number of floating-point values that follow. Assume that the list will always contain less than 20 floating-point values. For coding simplicity, follow every output value by a space, including the last one. And, output each floating-point value with two digits after the decimal point, which can be achieved as follows:printf("%0.2lf ", yourValue); Ex: If the input is: 5 30.0 50.0 10.0 100.0 65.0 the output is: 0.30 0.50 0.10 1.00 0.65 The 5 indicates that there are five floating-point values in the list, namely 30.0, 50.0, 10.0, 100.0, and 65.0. 100.0 is the largest value in the list, so each value is…Q1) Using Functions and Lists write a program where a function filterEvens takes a list of mix numbers and return it by filtering all the evens out. You can take list items from user or create static, and then passed it to function. The output should be the list with only evens example input_list = [12, 5, 7, 8, 2, 4, 1] output = [12, 8, 2, 4]. Please do in python. Thanks6.37 LAB: Multiples of ten in a vector Write a program that reads a list of integers, and outputs whether the list contains all multiples of 10, no multiples of 10, or mixed values. Define a function named IsVectorMult10 that takes a vector as a parameter, representing the list, and returns a boolean that represents whether the list contains all multiples of ten. Define a function named IsVectorNoMult10 that takes a vector as a parameter, representing the list, and returns a boolean that represents whether the list contains no multiples of ten. Then, write a main program that takes an integer, representing the size of the list, followed by the list values. The first integer is not in the list. Ex: If the input is: 5 20 40 60 80 100 the output is: all multiples of 10 Ex: If the input is: 5 11 -32 53 -74 95 the output is: no multiples of 10 Ex: If the input is: 5 10 25 30 40 55 the output is: mixed values The program must define and call the following two functions. IsVectorMult10…
- 6.28 LAB: Output values in a list below a user defined amount - functions Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, and output all integers less than or equal to that value. Ex: If the input is: 5 50 60 140 200 75 100 the output is: 50 60 75 The 5 indicates that there are five integers in the list, namely 50, 60, 140, 200, and 75. The 100 indicates that the program should output all integers less than or equal to 100, so the program outputs 50, 60, and 75. Such functionality is common on sites like Amazon, where a user can filter results. Your code must define and call the following two functions:def get_user_values()def output_ints_less_than_or_equal_to_threshold(user_values, upper_threshold) Utilizing functions will help to make your main very clean and intuitive. Use Python, please.7.19 LAB: Adjust list by normalizing When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by dividing all values by the largest value. The input begins with an integer indicating the number of floating-point values that follow. Assume that the list will always contain less than 20 floating-point values. For coding simplicity, follow every output value by a space, including the last one. And, output each floating-point value with two digits after the decimal point, which can be achieved as follows:printf("%0.2lf ", yourValue); Ex: If the input is: 5 30.0 50.0 10.0 100.0 65.0 the output is: 0.30 0.50 0.10 1.00 0.65 The 5 indicates that there are five floating-point values in the list, namely 30.0, 50.0, 10.0, 100.0, and 65.0. 100.0 is the largest value in the list, so each value is divided by 100.0.…onsider an input string TAM of letters ‘A’, ‘M’, and ‘T’. This string, which is given by the user, ends with ‘#’. It should be stored in a table (or array), called TAMUK. The number of each of these letters is unknown. We have a function, called SWAP(TAM,i,j), which places the ith letter in the jth entry of string TAM and the jth letter in the ith entry of TAM. Note that SWAP(TAM,i,j) is defined for all integers i and j between 0 and length(TAM)–1, where length(TAM) is the number of letters of TAM. 1. Using our algorithmic language, write an algorithm, called Sort_TAM, which sorts the letters in the array TAMUK in a way that all T’s appear first, followed by all A’s, and followed by all M’s. The algorithm Sort_TAM should have one parameter: The array TAMUK. Also, your solution is correct only if the following four constraints are satisfied: - Constraint 1: Each letter (‘A’, ‘M’, or ‘T’) is evaluated only once. - Constraint 2: The function SWAP(TAM,i,j) is used only when it is…
- 22.4 LAB: Adjust list by normalizing - functions (Use Python) When analyzing data sets, such as data for human heights or for human weights, a common step is to adjust the data. This can be done by normalizing to values between 0 and 1, or throwing away outliers. For this program, adjust the values by subtracting the smallest value from all the values. Input values should be added to the list until -1 is entered. Ex: If the input is: 30 50 10 70 65 -1 the output is: 20 40 0 60 55 Your program must define and call the function:get_minimum_int(nums)6.34 LAB: Contact list C++ A contact list is a place where you can store a specific contact with other associated information such as a phone number, email address, birthday, etc. Write a program that first takes as input an integer N that represents the number of word pairs in the list to follow. Word pairs consist of a name and a phone number (both strings). That list is followed by a name, and your program should output the phone number associated with that name. Ex: If the input is: 3 Joe 123-5432 Linda 983-4123 Frank 867-5309 Frank the output is: 867-5309 Your program must define and call the following function. The return value of GetPhoneNumber is the phone number associated with the specific contact name.string GetPhoneNumber(vector<string> nameVec, vector<string> phoneNumberVec, string contactName) Hint: Use two vectors: One for the string names, and the other for the string phone numbers.2.Assume list1 is a list of integers. Write a statement that uses a list comprehension to create a second list containing the elements of list1 that are greater than 100.