Write a decale function that takes as an argument a list l and a number d and returns the list obtained from l by adding an offset of d to each element of l. Example: decale([4, 17, 12], 3) is [7, 20, 15]. Write a function intercale_zeros that takes as an argument a list l and returns the list obtained from l by inserting a zero after each element of l. Example: intercale_zeros([4, 17, 12]) is [4, 0, 17, 0, 12, 0].
Q: SOQL Assignment Salesforce: You have to write a SOQL query in which we have to find out all the 1000…
A: Use the Salesforce Object Query Language (SOQL) to search your organization’s Salesforce data for…
Q: 1. Why data fields should be private?
A: Let's know what is private and then you will be in a better position to understand why data fields…
Q: This code is for c++ Write the Program for both the .h and the .cpp for the UML diagram Account…
A: Account.h code: #ifndef AccountH #define AccountH #include <iostream> using namespace std;…
Q: Describe how you would communicate to Ashok and the rest of the team about Ashok's injury. What…
A: In this case, since the first thing to do is to communicate the injury to the team members while…
Q: How would you describe three forms of hardware that are required to support a company's operations,…
A: Business Hardware Selection Choosing the Proprietary Business HardwareIf a firm wants to improve its…
Q: reony sutabe greh toversal sechrique which usas queue as e supporting component to cany out the…
A:
Q: What is the meaning of Datatype in Python? Please provide at least two examples
A: Introduction Datatype Data type is used to represent particular data. Data types are classes whereas…
Q: 2. Which of the following will allow you to remove your table in the database? (SQL) A. DELETE FROM…
A: - we need to choose correct for the SQL statements.
Q: Consider the following program written in AC language discussed in the class. The tokens and grammar…
A: the solution is an given below :
Q: Q2) Consider the regular expression: (ablac)* a. Use Thompson's construction to construct a NFA
A: Given Regular Expression : (ab|ac)*
Q: Declaring a class virtual transforms it into an abstract class. T/F
A: Introduction: When it comes to object-oriented programming, a virtual class is a form of class where…
Q: 2. Show the steps to ping the IP address of another computer
A: Ping on a computer: Ping is a computer system architecture powerful application that checks whether…
Q: uct page for a furniture st
A: I have designed the question below:
Q: What exactly is middleware?
A: Introduction: It is a piece of software that allows for the use of one or more types of…
Q: Describe how a stateless firewall would prevent all incoming and outgoing HTTP requests.
A: Introduction: You must allow both incoming and outgoing traffic on the following ports:
Q: 1. List some of application that you can controlled by a potentiometer. 2. Explain the function of…
A: Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: Explain the significance of continuous event simulation in detail
A: Introduction Explain the significance of continuous event simulation in detail.
Q: Deeply and briefly explain about intel AI for youth?
A: Artificial intelligence can be defined in a variety of ways, owing to the difficulty of defining…
Q: Complete a program in a class ToyCounter that computes the cost of toys sold in a shop. Five kinds…
A: Program for create toyCounter and compute the total cost
Q: . Your Content (50% mark) 2. Your Formatting (50%). Your work has to be in proper APA format, must…
A: Each question is answered in different steps 1.a Active directory Rights Management Services.…
Q: Sam and Sangu played a game. First, the Sam gives Sangu a sequence of different numbers N a1, a2,.,…
A: Input/Output Explanation: The first line of the input contains a single integer T denoting the…
Q: Six LINQ operators are available for usage in a query.
A: Definition of LINQ LINQ is for Language Integrated Query, and it's a feature of Microsoft's.NET…
Q: Use your own words to describe four different ways used to develop a project WBS briefly. Then,…
A: ANSWER:-
Q: List the item ID, description, and category for each pair of items that are in the same category.…
A: ANSWER:-
Q: what is the mechanism through which an operating system maintains memory, processes, and threads?
A: Memory management : The operating system (OS) manages a computer's principal or primary memory.…
Q: How are the untrusted network, the firewall, and the trustworthy network normally connected?
A: Introduction: While the Internet or another portion of a public access network is frequently used as…
Q: What is the value of JFK for the conversion below to be correct? (0100111JFK00)2 = (4FC)16 %3D…
A:
Q: Describe the functioning of the hard disk drive in a few words (HDD). What are the SSD's operating…
A: Introduction: The hard disc drive's operation (HDD) Platters: A platter is a huge circular magnetic…
Q: Computer science What are your thoughts on the TCSEC orange book?
A: Introduction: PC security is essentially the protection of a computer's structure and data from…
Q: Write a program to sort (using bubble sort) a set of 30 numbers stored in a file.
A: NOTE : As the question is not specific about the programming language to be used, so Python will be…
Q: What is meant by a pointer variable in c++? How is it used?
A: Answer the above questions are as follows:
Q: variable name in the programming language Visual Basic must begin with a letter (uppercase or…
A:
Q: What impact has the Internet had on system architecture?
A: Introduction: The Internet (or simply the Internet) is a global computer networking infrastructure…
Q: When you invoke a method on an object instance, the version of the method that will be executed will…
A: Instance methods are methods that require the creation of a class object before they may be invoked.…
Q: The question is, how do you keep class fields safe from unintentional modification?
A: Answer :
Q: What is the name given to the data that has been transferred from RAM to virtual?
A: We are going to understand the terminology which is responsible for transferring data from RAM to…
Q: Group root = new Group (); Scene scene = new Scene (root, 400, 400, Color.WH horizontalLines (10,…
A: I have the complete code below:
Q: Because a data warehouse is too large for business intelligence, a data mart is preferable to a data…
A: Justification: A data warehouse is a sort of data management system that is intended to facilitate…
Q: Please solve the question for beginners in programming 1. Write a method that receives the…
A: Java code for area of circle using method.
Q: We'll say that a String is ab-balanced if for all the 'a' chars in the string, there exists a 'b'…
A: Java program for above : import java.util.Scanner; class Prog{ public static void main…
Q: Explain the two-tier architecture of databaSeS.
A: Introduction: In a two-tier design, there are just two modules to be concerned with.
Q: Create an ordered, rooted tree that represents the infix form of the following equation. Then write…
A:
Q: LAN1 Usable #of Hosts: 100 Users Network Address: ?
A: I have answered below in the description.
Q: Discuss why it is critical for Systems Analysts to model the subject-domain of an information system…
A: Introduction: The systems analyst is in charge of defining the transforms implied by both the source…
Q: The following sample fle called studentdata.txt contains one line for each student in an imaginary…
A: - We have to get the student with maximum number of quizzes. - We are using python here.
Q: Software engineering Short answer Why Speech recognition is difficult to implement in real-time…
A: Introduction: Speech recognition is the process of recognising any sound using software and then…
Q: What is the significance of software development? The software development process may benefit from…
A: Software development :It refers to a set of computer science activities dedicated to the process of…
Q: Identify 5 current security architecture and design risks. Then: a) Describe each danger.
A: Malware: In order to steal or exchange information from you, a cybercriminal might pose as a…
Q: Homework 8.1 Using java fx programming draw the below picture
A: You are required in the below steps. Follow the screenshot to avoid an indentation error. You should…
Q: using equation method for Hamming code of (7,4),determine of the Following messages m1 = 1111 &…
A: The Answer is
Please answer it in Python
Write a decale function that takes as an argument a list l and a number d and returns the list obtained from l by adding an offset of d to each element of l.
Example: decale([4, 17, 12], 3) is [7, 20, 15].
Write a function intercale_zeros that takes as an argument a list l and returns the list obtained from l by inserting a zero after each element of l.
Example: intercale_zeros([4, 17, 12]) is [4, 0, 17, 0, 12, 0].
Step by step
Solved in 3 steps with 2 images
- 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].Please answer it in Python Write a function min_pair 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. Example: min_pairs([4, 7, 12, 0, 21, 5]) is 0 min_pairs([9, 3, 1]) is None. min_pair([16, 13, 10, 102, 7, 23]) is 10
- Write a python function named replaceVal(list, valToBeReplaced, newValue) which takesthe above described inputs and finds the value ‘valToBeReplaced’ in the list. If it ispresent, it is replaced with newValue and the updated list is returned, otherwise thesame list is returned.Example:[1,2,3,4,5], 5, 20Output: [1,2,3,4,20] Example:[10, 15, 20, 25, 30], 5, 20Output: [10, 15, 20, 25, 30]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']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
- Please answer it in Python Write a function extrait_pairs that takes as an argument a list l1 and returns the list obtained from l1 keeping only the even integers (and without changing their order). Be careful, l1 must not be modified by the function. Example: extrait_pairs([4, 7, 12, 0, 3]) is [4, 12, 0] and extrait_pairs([21, 17, 3]) is [ ].I am to write a python function that receives a List L and returns two lists, one containing the first half of the List and the other containing the second half of the List. for Example if the List is L = [1,5,4,2,3,6,9,8] I want to get A = [1,5,4,2] and B = [3,6,9,8]Please answer it in Python Write a function indice_de 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. .. Example: indice_de(12, [4, 7, 12, 0, 21, 5]) return => 2 (because 12 is placed at index 2), and indice_de(6, [4, 7, 12, 0, 21, 5]) return => None. Write a function trouve_premier_pair that takes a list as an argument and returns the even integer that appears first in the list. If the list does not contain an even integer, the function will return None. Example: trouve_premier_pair([1, 15, 4, 7, 12, 3]) return =>4 and trouve_premier_pair([1, 17, 7]) return =>None. Write a function extrait_even that takes as an…
- Write a function that takes two arguments, a list L1 and a list L2. • If the length of the list L1 is greater than twice the length of the list L2, then append the first three values of L1 to the three last values of L2. E.g. if L1 = ‘(1 2 3 4 5 6 7) and L2 = ‘(8 9 10), then return ‘(1 2 3 8 9 10) Should be written in the Racket programming languagePlease answer it in Python Write a function somme_even that takes a list as an argument and returns the sum of the even numbers contained in the list. Example: somme_even([4, 7, 12, 0, 21, 5]) return => 16 (because 16=4+12+0). Write a function nb_elem_even that takes a list as an argument and returns the number of even integers contained in the list. Example: nb_elem_even([4, 7, 12, 0, 21, 5]) return => 3 (because 4, 12, and 0 are even). Write a function max_pair that takes a list as an argument and returns the largest even integer contained in the list. It will be assumed for simplicity (in this question only) that the list always contains at least one even number. Example: max_even([4, 7, 12, 0, 21, 5]) return => 12.Write a function that will accept a list of numbers and an integer (n). Thefunction should return a list containing every nth item from the input list,always starting with the first item in the list. The original list should notbe modified.For example, if the function is passed the list[8, 3, 19, 26, 32, 12, 3, 7, 21, 16]and the integer 3, it will return the list[8, 26, 3, 16]The function should be general, and work for any list and any positiveinteger value of n.def countByN(myList,n):return myList[::n]