aking a list of numbers from 2 to n Create a function named make-2-n-list that takes in one parameter, the end number. It should return a list of numbers from 2 to that number.(make-2-n-list 30) ➔(2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1718 19 20 21 22 23 24 25 26 27 28 29 30) Hint: make a function that makes the list backwards (easy right-fold pattern), then look at your recursive case and think backwards.
Q: Write a C++ program that requests any number of input integers from user, sorts and displays the…
A: - We need to use dynamic memory allocation and bubble sort to sort the array of integers.
Q: create a VendingMachine object that performs the following operations: Purchases input number of…
A: Dear Student, The required code with implementation and expected output is given below -
Q: Write a Java assignment statement that will set the value of the variable distance to the value of…
A: Lets see the solution.
Q: What is the running time of the method question1( int n ) as a function of n? Justify your answer.…
A: The running time of the method question1( int n ) as a function of n is discussed in the below step
Q: predictive accuracy, a sample of the data is used for training and another independent sample is…
A: Dear Student, The answer to your question with required steps and explanation is given below -
Q: Implement programme offers an example of how to carry out these duties. A String object is made with…
A: In this question we need to write a program which form strings of a single word from a given string…
Q: How can software be developed to predict and respond to changes?
A: Please find the detailed answer in the following steps.
Q: Implement programme provides an example of how to carry out these tasks. The string "Hello world" is…
A: Answer the above program are as follows
Q: QS. A) Following is the code segment: 1.What smells in this code? 2.How to transform it into a clean…
A: Dear Student, The answer to your question is given below -
Q: Due to the fact that software development is very context-specific, the reuse of experience…
A: Software development is very context-specific. So, the reuse of experience artifacts is typically…
Q: Add these Binary numbers: 10101010 + 101 =
A: In step 2, I have provided answer for both questions-------------
Q: Q.1 Subnet the IP Address 203.10.93.0/24 into 30 Subnets. After subnetting, is 203.10.93.30 a valid…
A: As per our guidelines we are supposed to answer only one question. Kindly repost other questions as…
Q: Project Implementation For Retina ATM Scanner
A: Introduction: A project methodology is a collection of project management methods, tools, and…
Q: No selection 191 192 193 194 195 196 197 198 199 200 201 202 Student Answers.cs 203 204 205 206 207…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Write an algorithm for the following problem. The input consist of three integers a, b, and w.…
A: Algorithm is given below:
Q: Let the following transition table for NF Input b {} -X1 Input a {X1, X2, X4}
A: NFA stands for Nondeterministic finite automata and in NFA for single input there many be zero or…
Q: Mapping: Create relational schemas for the ER diagram given below. Indicate clearly the primary and…
A: The processes to generate the relational schemas for the provided Entity Relationship diagram are…
Q: Write two local classes named Pump and Cylinder as described below. Then, write a main function that…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: write non-functional requirements for talabat application 1. Portability: 2. Reliability: 3.…
A: Non-functional requirements are those that describe how a system should behave, rather than what the…
Q: Problem Statement Write a C Program that determine the number of occurence of a particular character…
A: Step-1: StartStep-2: Declare variable N and tempStep-3: Take input from user for NStep-4: Initialize…
Q: elp the question.
A: The code is below:
Q: Critically analyse the significance of Capability Maturity Model in developing and refining an…
A: Dear Student, The answer to your question is given below -
Q: wo question in code ple
A: Solution:: 1: public class LoanAccount { // properties private double…
Q: Programming Language: Java Direction: Use the while loop statement to display for the given output…
A: public class whileLoopProgram { public static void main(String args[]) { int i = 1;…
Q: Here is my code: function flatten (arr) { arr2 = []; for (let i = 0; i < arr.length; i++) {…
A: Here is my code: function flatten (arr) { arr2 = []; for (let i = 0; i < arr.length; i++) {…
Q: Task Instructions X Protect the current worksheet, letting users select both locked and unlocked…
A: Dear Student, I am assuming the question is based on Microsoft Excel, the answer based on it is…
Q: Assignment A scientist has developed a mathematical model for a physical process, and he wants to…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: The binary number 1110 0101 equals O F6 D5 O 6C O E5 in hexadecimal.
A: Answer : The binary number 1110 0101 equals hexadecimal E5. 11100101 (binary number) = E5…
Q: Define COCOMO. A project size of 83200 lines of code is to be developed and the team has average…
A: COCOMO (Constructive Cost Model) is a software cost estimation model that is used to estimate the…
Q: how is k-means np hard problem if dimensionality of data is at least 2. Explain mathematically
A: In this question we need to explain how k-means is np hard problem if dimensionality of data is at…
Q: The current allocation and maximum needs of a system having four processes and five allocated…
A: First finding Need matrix : Need(i,j) = Maximum(i,j)-Allocated(i,j) Need = //here we are…
Q: Create a PHP page name it print.php - This page should be reachable via the following url:…
A: <?php // Get the student name and ID from the URL $stdName = $_GET['stdName']; $stdID =…
Q: For function f(n)=log n and time t=1 second, determine the largest size n of a problem that can be…
A: - We have to get the maximum number n fow which the time to solve becomes 1 second.
Q: Compare Direct Address Table and Hash Table, which of the following is FALSE? O A. A Direct Address…
A: In this question, it is asked which of the following points given in the question are false. The…
Q: Draw the decision table for the below given scenario. Omntel will give the discount on the mobile…
A: Dear Student, The answer to your question with required explanation is given below -
Q: Answer by true (T) or false (F) with a justification if false. . . Testing is the most time…
A: Dear Student, The answer to your question is given below -
Q: Color the following map of Pakistan using the constraint satisfaction problem. We Have 5 variables…
A: In this question, it is asked to provide the solution for the given problem of constraint…
Q: Write a C++ program that requests any number of input integers from user, sorts and displays the…
A: Write a C++ program that requests any number of input integers from user, sorts and displays the…
Q: 1. Find the Big-O of f(n)=log (n+4)
A: According to our guidelines, we are allowed to solve only the first question. Please post the other…
Q: I have already defined in Matlab the following data: x = -1:0.1:1; y = airy(x); Write the most…
A: Dear Student, The required one-liner is given below along with implementation and output -
Q: Create a Java program that will display the student's information. The program should perform the…
A: Step-1: StartStep-2: Declare variable fName and take input from userStep-3: Declare variable mName…
Q: Programming Language: Java Direction: Use the do while loop statement to display the same given…
A: The JAVA code is given below with output screenshot Algorithm Declare an integer variable i and…
Q: Write a python code that calculates and prints the new salary of an employee with entered raise rate…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Assignment A scientist has developed a mathematical model for a physical process, and he wa good is…
A: Dear Student, The required source code, implementation and expected output of your question is given…
Q: Q2/Write a MATLAB program to calculate the following equation S = 731 Στη n=1
A: We have to calculate the value of sqrt of n. From n = 1 to 737. Using for loop we will perform the…
Q: Write a program that tracks how much calorie the user burns in total in a day and reports if the…
A: Below I have provided a program for the given question. Also, I have attached a screenshot of the…
Q: Consider the language L= {a^(2^n ) n≥0}. Construct the state diagram for TM?
A: Turing machine: Alan Turing invented the Turing machine in the year 1936. It accept the recursive…
Q: Use five hex digits to show each of the micro-instructions in a new micro-program that implements…
A: In this question we have to use five hex digits to show each of the micro-instructions in s new…
Q: Developers can use npm start to run their node applications. Select one: O True O False package.json…
A: As per our company guidelines we are supposed to answer only first 3 sub-parts. Kindly repost other…
Q: Make a Java application. Represents a postfix expression integer evaluator. The operands are assumed…
A: Represents a postfix expression integer evaluator. The operands are assumed to be constants. The…
Making a list of numbers from 2 to n
Create a function named make-2-n-list that takes in one parameter, the end number. It should return a list of numbers from 2 to that number.(make-2-n-list 30) ➔(2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1718 19 20 21 22 23 24 25 26 27 28 29 30)
Hint: make a function that makes the list backwards (easy right-fold pattern), then look at your recursive case and think backwards.
Pls use scheme(R5RS) to finish this program!Thank you a lot!
Step by step
Solved in 4 steps with 2 images
- Write a function that takes three lists of integers, l1, l2, and l3, and returnsa list of all tuples, where each tuple (a,b,c) is such that a is from l1, b is from l2 and c is from l3 and a+b=c. For example, given [1,2,3], [4,5] and [7,8]you should return [(2,5,7), (3,4,7), (3,5,8)]. The returned list must be sortedaccording to a and b, in ascending order.Write a function countBottom() that takes a list as parameter, finds and returns the number of bottom values in the list.A bottom value is less than its predecessor and its successor.Assume that the list contains numbers.Example: [4, 2, 3, 7, 6, 6, 4, 3, 5, 8, 6, 7, 5] has 3 bottoms, the first 2, the second 3, and last 6. All these values are less than their predecessor and their successor. can u use pyhton and pls fast answer=)Question 2: Write a function that takes a list of distinct integers l, and an integer k. Your function then finds the index of the integer in l, whose removal from l results in a list whose sum is k. For example, given [3,6,4,1,5,2] and 18, your function should return index 0, which corresponds to 3 in the list. Because, when 3 is removed from the list, the sum of the remaining list [6,4,1,5,2] is 18. You can assume that the given problem is always solvable. """ def removeOne(l, k):
- (a) Write a function top_students(marks) that takes as a parameter a non-empty list of (name, mark) tuples, where name is the name of a student (a string) and mark is the student's mark for some course (an int). The function returns a list of the names of all students whose mark equals that of the top student. If there is just a single student with the maximum mark, the return value will be a list of length 1, as in the first example in the table below. The names in the return list should be in the same order as in the input parameter list. Test Result marks = [('Beatrice', 50), ('Nerly', 90), ('Uniza', 70)] print(top_students(marks)) ['Nerly'] marks = [('Beatrice', 80), ('Nerly', 75), ('Uniza', 66), ('Joshua', 80)] print(top_students(marks)) ['Beatrice', 'Joshua'] (b) Write a function char_counts(string) that takes a string as a parameter and returns a dictionary in…How to write a function in python where it takes a list of string s. Where s= ["hello","lazyness","polite","politness"]. The function takes the string s as input and returns a string that is the longest even length string that ends with "ness". But if there is no string that ends with "ness" then an empty string is returned.In python, remove_from_list(my_list, indices): Takes two lists as input. Creates a new list from the first input list by removing the elements at indices given by the integers in the second input list, then return the new list. The indices in the second input list may have any order. For example, if the first input list is [4, 8, 12, 16], and the second input list is [0, 2], then the new list returned from the function should have the 4 and the 12 removed, because they were at indices 0 and 2 of the original list. Note: You do not need to consider negative indices for this function. >>> remove_from_list(['abc', 'def', 'ghi'], [1]) ['abc', 'ghi'] >>> strs = ['The', 'quick', 'brown', 'fox'] >>> remove_from_list(strs, [0, 3]) ['quick', 'brown'] >>> strs ['The', 'quick', 'brown', 'fox'] # original list is unchanged >>> remove_from_list(['The', 'quick', 'brown', 'fox'], [3, 0]) ['quick', 'brown']
- Please answer it in Python Write a function min_odd that takes a list as an argument and returns the smallest even integer contained in the list. If the list contains no even integers, the function will return None. For Example : min_odd([45, 62, 19, 22, 26, 18, 3, 5, 14])Expected answer is 14 min_odd([])Expected answer is None Write a function index_of that takes as an argument an integer (supposedly even) and a list, and returns the index to which this integer appears in the list. If the integer does not appear, the function will return None. It is assumed here for simplicity that the integer searched for does not appear several times in the list. Hint: if the for e in list loop doesn't suit you, remember that you can make a for + range or a while. .. For Example: index_of(34, [3, 67, 62, 34, 19, 24])Expected answer is 3 index_of(16, [2, 6, 104, 5, 25, 18, 50, 16])Expected answer is 7Please answer it in Python Write a function insere_milieu that takes as an argument a list l and an element elem and returns the list obtained from l by adding elem "in the middle" of l, that is: If the length of l is even, the item is added once, in the middle of the list. If the length of l is odd: the element is added on either side of the central element. Example: insere_milieu([4, 7, 12, 3], 0) is [4, 7, 0, 12,3] insere_milieu([9, 3, 5, 6, 2], 1) is [9, 3, 1, 5, 1, 6, 2].Write a function(in pyhton) that takes a list of distinct integers l, and an integer k. Your function then finds the index of the integer in l, whose removal from l results in a list whose sum is k. For example, given [3,6,4,1,5,2] and 18, your function should return index 0, which corresponds to 3 in the list. Because, when 3 is removed from the list, the sum of the remaining list [6,4,1,5,2] is 18. You can assume that the given problem is always solvable.
- Write a function called `filler(A, l)` that takes an integer `A`, and a list of integers `l` and if some of the numbers in `l` sum up to `A` then it returns a list of these numbers. Otherwise, it returns `None`. For example, filler(5, [1,6,3,4]) returns [1,4]. filler(5, [1,6,3,7]) returns None. filler(0, [-1,-1,2,-3]) returns [-1,-1,2]. filler(10, [2,3,2,3,1]) returns [2,3,2,3]. If there are multiple answers, then return any of them. You can use each number in the list once for each occurence. """ def filler(A, l): # remove the following line to solve this question returnList of triples or a triple of lists? Write a function l3_of_3l : ’a list * ’b list * ’c list -> (’a * ’b * ’c) list = that transforms a triple of lists into lists of triples. If lengths don’t match then ignore leftover elements. examples l3_of_3l ([1;2;3],[1.;2.],[’a’;’b’;’c’;’d’]);; - : (int * float * char) list = [(1, 1., ’a’); (2, 2., ’b’)] l3_of_3l ([1.;2.],[’a’;’b’;’c’;’d’],[1;2;3]);; - : (float * char * int) list = [(1., ’a’, 1); (2., ’b’, 2)]Write a function that gets a linked list of ints, and reverses it. For example - on input 1 -> 2 -> 3 -> 4, after the function finishes the execution, the list becomes 4 -> 3 -> 2 -> 1 - If the list has one element, then it doesn’t change - If the list is empty, then it doesn’t change You may use the data fields in the struct and the functions provided in LL.h and LL.c. // reverses a linked list void LL_reverse(LL_t* list); Test for the Function: void test_q3() { LL_t* lst = LLcreate(); LL_add_to_tail(lst, 1); LL_add_to_tail(lst, 3); LL_add_to_tail(lst, 8); LL_add_to_tail(lst, 4); LL_add_to_tail(lst, 3); LL_reverse(lst); intcorrect[] = {3,4,8,3,1}; inti; node_t* n = lst->head; for(i=0;i<5;i++) { if (n==NULL) { printf("Q3 ERROR: node %d==NULL unexpected\n", i); return; } if (n->data != correct[i]) { printf("Q3 ERROR: node%d->data==%d, expected %d\n", i, n->data, correct[i]); return; } n = n->next; } if (n==NULL) printf("Q3 ok\n"); } Support…