# In[ ]: |def minIndexAfter (items, startPos): minIndex = startPos i = startPos + 1 while (i < len (items)): if (items [i] < items[minIndex]): minIndex = i i = i + 1 return minIndex Define a function called selectionSort below. In the body of the function, you will need to call the 'swap function and the 'minlndexAfter' function. - Define 'selectionSort' here items = [395,2,-4,20,47,200,-50,-12] selectionSort (items) print (items)
Q: the following is logically equivalent to [(p ∨ q) ∧ (p ∨ ¬q) ∧ (p ∨ r)] → [(p ∨ ¬q) ∧ (¬p ∨ ¬q) ∧ (¬...
A: Lets see the solution.
Q: Big Lots Services (BLS) would like to develop a model that will help allocate their technician’s tim...
A: According to the information given:- We have to develop a linear programming model on the basis of i...
Q: Using R programming - Dataset contains around 65k+ traffic-related violation records and display 10 ...
A: Different visualization techniques: Horizontal Bar plot Vertical Bar plot Histogram Box plot Multip...
Q: 8. For the following circuits, find a Boolean expression and construct the truth table. a) A B b) А ...
A: Defined the boolean expression and truth table for the given circuits
Q: What does a computer's brain look like?
A: Computers: Charles Babbage created the predecessor to the computer we use today, dubbed 'Babbage's E...
Q: When it comes to software and hardware, what's the difference between the two?
A: A computer is an electronic machine that takes input, processes it and produces output. There are tw...
Q: What are the drawbacks of file management systems?
A: Introduction: A file processing system is a collection of files and applications that is used to acc...
Q: What role do labour optimization algorithms and staffing models play in healthcare productivity?
A: Introduction: Labor optimization, sometimes referred to as workforce optimization, is a collection o...
Q: Create a function named mat_desc() that througouhly describes a matrix, it should: 1. Displays the s...
A: There is a shape function to determine the shape of a matrix. There is a size function to determine...
Q: Write the pseudocode to find the lowest common ancestor of two nodes n1, n2 in a linked binary tree ...
A: Code to fin lowest common ancestor of two nodes in a linked binary tree structure
Q: There are two basic approaches to the design of OS kernel. One is called microkernel approach, and t...
A: 1) monolithic kernel 2) xv6 allocates one kernel stack for each process. The kernel stack is separat...
Q: A Moving to the next question prevents changes to this answer. estion 14 If a number is divsible by ...
A: Solution:
Q: Given a relation R(P ,Q ,R ,S, T, U,V,W, X,Y) and functional dependency set FD = {PQ→R,P→ST,Q→U,U...
A: Given a relation R(P ,Q ,R ,S, T, U,V,W, X,Y) and functional dependency set FD = {PQ→R,P→ST,Q→U,U→...
Q: 3 What makes content web effective?
A: Clear, relevant, and keyword-rich content that delivers the proper message with power and conviction...
Q: Write a program in Python that simulates a bank. This is similar to what you did with your calculato...
A: Step 1 : Start Step 2 : Define a function deposit() which takes an amount as parameter and adds to t...
Q: Which measures for usability and user experience were used in the review, and how were they distribu...
A: Intro The usability and user experience metrics, that are utilized in the evaluation are: Testing ...
Q: 5. What is wrong with the following function and why? int *setup(int n){ int a(n): for(int i=0; i<n;...
A: The solution to the given problem is below.
Q: What are the three primary roles of database administration?
A: Introduction: Maintenance is handled by Database Administrators, which involves monitoring servers, ...
Q: make diamond
A: Given- Write a program in c++ to make diamond
Q: The manager of the company has informed his assistant to enter the age of all the workers working i...
A: Answer: Step 1: Code: while True: x = input('\nenter age:') age = x.split() for i in age: if i i...
Q: Describe the three types of data processing strategies.
A: Data processing is the collection, modification, and processing of gathered data for the intended us...
Q: What exactly is improved data agility?
A: Introduction: Agility is defined as the capacity and desire to learn from experience and then adapt ...
Q: Discuss the transition of Unnormalizated data to FNF.
A: *As per guidelines, only 1st question is answered. For other questions, please post separate queries...
Q: Write a Python program that takes a String as input from the user, removes the characters at even in...
A: Introduction: Write a Python program that takes a string as input from the user, removes the charact...
Q: What is the mathematics behind AI machine learning?What kind of math's is needed for machine learni...
A: What is the mathematics behind AI machine learning?What kind of math's is needed for machine learni...
Q: The advancement of database technology should be segmented.
A: Segmentation occurs in your CRM, where your contacts are stored. In order to segment your database, ...
Q: Methodology about the practices and deliverables of matrices codes in python fundamentals
A: In Python different matrix manipulations and operations. Numpy Module provides different methods for...
Q: When it comes to infrastructure and architecture, what's the difference?
A: Infrastructure defines the actual set of components which make up a system. The examples of Infrastr...
Q: A tv screen is made up of pixels the resolution of the screen is 1940x1090 and the screen needs to b...
A: The resolution bandwidth is the width of the bandpass filter that is swept across the frequency rang...
Q: ology is b. How it would impact human lives and values c. Ethical issues that may arise in the app...
A: As per guidelines, we can only solve the first three-part of a multipart question. Hence resubmit th...
Q: What was the process of creating the contemporary computer?
A: Introduction: Computers: Different hardware and software have evolved in recent years in computer sc...
Q: Understanding the function of information in the generation and use of business intelligence is refe...
A: Introduction: Business intelligence is the process through which businesses employ strategies and te...
Q: Explain the following with respect to 8086 Microprocessor. a. Procedures with example b. Different t...
A: The Answer is
Q: Bourne/Bash shell) a) Write a shell script that checks to see if your PATH environment variable con...
A: ach shell session keeps track of its own shell and environmental variables. We can access these in a...
Q: 80x86 Intel Assembly language Write an assembly language to declare all the variables needed in the...
A: Lets see the solution in the next steps
Q: Create flowchart for constructing a Binary Tree.
A: let us see the answer:- A complete binary tree is one in which all of the levels are completely fill...
Q: Compile the pseudo-x86 program below into x86, placing all variables on the stack. movq $1, x movq $...
A: Summary: - Hence, we have discussed all the points.
Q: Big-O Coding Exercise Show your solution and explanations. Show that a function y = n^4 + 3 can not ...
A: We need to prove that y=n^4+3 is not O(1).
Q: What is the most significant part of a computer's hardware?
A: The following are the most significant parts of the computer hardware.
Q: nat language does the following finite automata accept: a
A: The languages accepted are given below. language = {0 ,01,011,0111,010,01000,01011 }
Q: Charles Babbage is known as the "Father of the Computer" for a reason.
A: Computer is an electronic device which made life of human very simple starting from basic calculatio...
Q: 2) Calculate y = x³ – 3x + 12 for x = [0, 1, 2, –3,–6, 200, –9] , print rules given below and y valu...
A: C++ Code for the given expression for all values of x #include <iostream> using namespace std;...
Q: Question 2 Which of the following is the proper recursive case for the following function int Recurs...
A: Note: Valid recursive call must lead to termination condition or base case in the given function : t...
Q: Please code the following problem in Python. Please follow the instructions. Thank you, I'll give up...
A: Introduction: Make a Big-O function that accepts, as an input, a list of size n and prints all the i...
Q: Identify and describe the four key components of an information system.
A: Introduction: Here we are required to describe the four key components of an information system.
Q: n PHP language, write a program to input a string from the user and print every character of the str...
A: Answer
Q: hb117guxbs:./nyahell nyshell> exec 1s myahall: startinge ahild pid 7971 ayshell myahell.c yahe1l> tr...
A: Given 2:08 0 • X A CS511 Pro... < 1:1 faculty.wiu.edu Part 1 The structure of your program should...
Q: Write a program that accepts the lengths of three sides of a triangle as inputs. The program output ...
A: Code: side1 = int(input("Enter the first side: "))side2 = int(input("Enter the second side: "))side3...
Q: Is it feasible to make a succession of interrelated judgments using dynamic programming? So, what sh...
A: Introduction: Dynamic programming is used to solve issues that can be broken down into subproblems. ...
Q: Explain any five assembler directives of 8086 microprocessor.
A: 8086 Microprocessor: It is the enhanced version of Intel 8085 microprocessor and designed by Intel i...
Step by step
Solved in 3 steps with 1 images
- The function that will a single items to the list is Oextend (...) Oadd(...) Oappend(...) Olengthen(...)Using the ListNode structure introduced in this chapter, write a function void printFirst(ListNode *ptr)that prints the value stored in the first node of a list passed to it as parameter. The function should print an error message and terminate the program if the list passed to it is empty.Write a function with below starting function: public static void printFirstAnd Last(ArrayList list) The approach should accomplish the following: Print "no elements" if the list is empty. Print the single element in the list if there is only one. Print the first entry in a list with more than one element, followed by a space, and then the last element.
- Write the code of the following functions: def fillX(pointsX,lowerLimit, upperLimit): This function receives a list pointsX and returns the same list with values between loverLimit and upperLimit. There are number of them.About initial programming in python: Create a function that receives as parameters a list of 4 elements [name,[phone(s)], email, instagram] and a phone number:• If the phone number is in the list, it must be removed.• If not, no updates will be made. Note: phone(s) is within another list. Your function should only return a Boolean value, indicating whether the change was made or not. To find out if the function did the phone deletion correctly, you should check the contents of the list with the contact details you used to test your function after executing it. In the image is the model of parameters, in this case the function must exclude from the list of 4 elements the indicated number '44322456' and return "True".complete the following function. // It is the same as observeCounter except that f has a parameter of type List[Counter] not Counter. // f will insist that the List[Counter] has length 3. // You must return a List[Int] not an Int. // The first element of the result List[Int] must correspond to the number of times that increment/decrement were called on the first element of type List[Counter], similarly for the second and third elements. def observeCounterList (f : List[Counter] => Unit) : List[Int] = { // TODO: Provide definition here. List (-1, -1, -1) }
- Write a function list2DigitOdd() that creates and returns a list that contain all positive 2-digit odd numbers. The function call list2DigitOdd() will return a list containing 11, 13, 15, ..., 99.1- Programming Problem Part 1 Write a function that will have a list as an input, the task of the function is to check if all the elements in the list are unique,( i.e. no repetition of any value has occurred in the list), then the function returns true otherwise it returns false. Your program should include a main method that call the method to test it. (If you would use built-in functions in Python, use lists’ or dictionaries’ methods as we studied their time efficiency in class)Write the function splitList that takes the first argument list and splits it into two: a list of all the elements that are less than the head (the second argument), and a list of all the elements that are greater than or equal to the head (the third argument): listElementT splitList(listADT list, listADT* ItList, listADT* geList); Note that the head is returned by the function. a) Write this function as a recursive function. b) Write this function as a nonrecursive function.
- Most common names Write a function mostCommonName(L:List[str]) -> List[str] that takes a list of names (such as ["Jane", "Aaron", "Cindy", "Aaron"], and returns the most common name in this list (in this case, "Aaron"). If there is more than one such name, return a list of the most common names, in any order. That is, mostCommonName(["Jane", "Aaron", 'Jane", "Cindy", "Aaron"]) returns, for example, the list ["Aaron", "Jane" ]. If the input list is empty, return an empty list. Also, names are case- sensitive i.e. "Jane" and "JANE" are different names. assert set (mostCommonName(["Jane", "Aaron", "Jane", "Cindy", "Aaron"])) == set ( ["Ai assert set (mostCommonName(["A", "B", "C", "a", "B"])) set(["B"]) assert mostCommonName([]) == [] Your Answer: 1 # Put your answer here 2 Submit ==Q1:Write a function that returns a new list by eliminating theduplicate values in the list. Use the following function header:def eliminateDuplicates(lst):Write a test program that reads in a list of integers, invokes the function,and displays the result. Here is the sample run of the program Enter ten numbers: 2 3 2 1 6 3 4 5 2The distinct numbers are: 1 2 3 6 4 5 Q2:Write a program that reads in your Q1 Pythonsource code file and counts the occurrence of each keyword in the file.Your program should prompt the user to enter the Python source code filename. This is the Q1: code: def eliminateDuplictes(lst):newlist = [] search = set() for i in lst: if i not in search: newlist.append(i) search.add(i) return newlist a=[] n= int(input("Enter the Size of the list:")) for x in range(n):item=input("\nEnter element " + str(x+1) + ":") a.append(item) result = eliminateDuplictes(a) print('\nThe distinct numbers are: ',"%s" % (' '.join(result)))Code in python Given a list, L, the function front_two creates a new list of length 2 out of the first two items in L as follows: In the new list, the second item becomes the first item, and the first item becomes the second. If L contains only one item, the first item in the new list should be the value None. If L is empty, both items in the new list should be value None. The function returns the new list. For example: Test Result L = ['a', 'b', 'c', 'd'] print(front_two(L)) ['b', 'a'] L = [] print(front_two(L)) [None, None] L = [5, 2] print(front_two(L)) [2, 5] L = [7] print(front_two(L)) [None, 7]