Write a function inde which returns the index (start from 1) of the occurrence of a given value. Use helper function. Two functions are enough. inde(1, [1,2,1,1,2,2,1]) → [1,3,4,7]
Q: Write a Python Program in OOP: Create a five (5) classes Classes must be used in another...
A: here we write simple python code with given requirement: ===========================================...
Q: What are the characteristics of both time-sharing and distributed operating systems, and how do they...
A: Time-sharing OS features: Each user gets a little chunk of a shared computer at a time using CPU sch...
Q: 15. Assume a computer has 24-bit addressing, and an 8192-byte cache with 64-byte lines. The cache is...
A: Given that, Number of addressing bits= 24 Cache size= 8192 bytes Cache line size= 64 bytes Number of...
Q: ider the following neural network. Assume that outputs O1, are outputs of sigmoid activation functio...
A:
Q: Write a program in the Python language to find the sum of all natural numbers in the range n to 150 ...
A: According to your question Answer is given below: Approach: Declare the variable n and use the inpu...
Q: Make Album in c++ You are going to develop a new class named Album. This class will has (at a minim...
A: Make album in C++ program ALGORITHM: Step 1: Create a class name Track Step 2: Create a title as "s...
Q: What is the purpose of smallpdf(app)? What is the goal?
A: Smallpdf application is made for a specific format of file hierarchy i.e. pdfs. It consists of multi...
Q: Consider a two-tier memory system consisting of cache (SRAM) and main memory (DRAM). The cache acces...
A: The answer is
Q: Using the input file of integers named randomNumbers.txt found in Module 6, write a Python program t...
A: Introduction Using the input file of integers named randomNumbers.txt found in Module 6, write a P...
Q: Which software development team member would make the most use of the tool,Load Runner A. Software e...
A: Load Runner :- It is an Testing tool which is used to monitor the performance of application when th...
Q: a have to create a program mmetric rod and the prograr
A: given - Project 2: You have to create a program in C language in which the user enters the mass M an...
Q: RTC means?
A: Introduction: Real-time computing (RTC) refers to hardware and software systems that are subject to ...
Q: House +numberRoom:int +type:String +Displaylofol); Bungalow +location:String +gwnerName:striog. Disp...
A: Here is The Solution.
Q: Cloud computing has the potential to have a substantial impact on the broader community. Is it possi...
A: Introduction: Computing in the cloud: Cloud computing is the process of obtaining resources from clo...
Q: What distinguishes professional software from "academic" software development?
A: Answer: In professional software development a project is developed under supervision of skilled pr...
Q: ate Foo(shared_ptr ptr) otr = TO:
A: Let’s say, you call a function named sum from main. In this case, main is the ‘calling’ function and...
Q: Discuss how you would utilize the Interactive technique of data collection at your workplace or in y...
A: There are three key collaborative strategies you can use to access the information needs of an organ...
Q: Write a regular expression that describes the following languages over the alphabet Σ = {a, b}: a) ...
A: Here in this question we have asked for regular expression a) L = {all strings that contain the subs...
Q: Write a function, to be included in a circular sorted linked list class, called greater, that will r...
A: I have answered this question in step 2.
Q: describe how salt is used in cryptography to make passwords more difficult to crack
A: Given: Explain how salt is used in cryptography to make password cracking more difficult.
Q: Consider the grammar below: S → aSb|bSa|SS|A For the string ab, how many leftmost derivations with 4...
A: : S -> aSb | bSa | SS | λ Now the leftmost derivation with number of steps is 4 or less are: a) ...
Q: Suppose your friend, Alice is trying to find all the odd numbers that are between X and Y. You want ...
A: Step-1: Start Step-2: Start a for loop i = 92 to 1092 Step-3: Check if every i is not divisible by 2...
Q: Two channels one with a bit rate of 190Kbps and another with a bit rate of 180 Kbps are to be multip...
A: The answer is
Q: Methods Java Write the appropriate method headings using the provided method name for the following ...
A: The program is written in Java. Please find the source code and output in the following steps.
Q: LVE IN MATLAB. How would I write the code to solve this in matlab?
A: It is defined as a programming language developed by MathWorks. It started out as a matrix programmi...
Q: plexity of quicksort to mergesort. While quicksort’s worst-case is O(n2) and mergesort’s is O(nlogn)...
A: Ans a)- The complexity of merge sort is O(NlogN) in all three cases which quicksort in best case and...
Q: Question2: Use affinity Diagram for creating a store space and classify and organize the following i...
A: According to our guideline we solve first one: ================================== Here below we make...
Q: House +pumberRoom:int +type:String +Displaylotol); Bungalow 3.
A: In diagram here House is Superclass and Bungalow is subclass so relationship between these cla...
Q: Figure out what kinds of connections there are between mobile devices and the cloud. What are the ad...
A: Answer : Private , public and hybrid connection are available between cloud and other devices.
Q: using python Use a Lambda function to take a list of numbers and get the square root of each number...
A: The question is to create a lambda function in python.
Q: Why is it so difficult to investigate and prosecute crimes committed on the dark web and deep web?
A: Introduction: The dark web has evolved as a key centre of illegal trade, a fully working marketplace...
Q: Write a GUI-based program to compute the new pay of an employee for a given pay raise rate. The prog...
A: Answer is given below-
Q: Discuss the advantages and disadvantages of multipurpose microcontroller pins.
A: Introduction: A microcontroller is a little device that controls all of the equipment in a computer ...
Q: 5 i%3D2 Lj=2
A: Here is the solution:
Q: Which of the following staterments is not correct? O f the relation R on a set A is reflexive then t...
A: Sort Answer: option 1 is correct. If the relation R on a set A is reflexive then the complement rela...
Q: Create a progra some basic fun
A: given - Create a program that allows the user to dosome basic functions.First, ask the user if they ...
Q: What are the differences between websites and webpages?
A: Ans : Difference between websites and webpages : Website: 1) Website is a collection of webpages dis...
Q: 2-6 3 Let A-0 -s 0 -2 B. and C- 25 Then which of the following is true? O The size of AXB is 2X3 O T...
A: First let's understand how matrix multiplicaition works :- Consider one matrix In the matrix A we h...
Q: In Web testing, explain the difference between Authorization and Authentication.
A: Difference between Authorization and Authentication in Web testing: Authorization: Authorization is ...
Q: If you read a string input: "PROGRAMMING IS FUN" using the following code, what will be the output o...
A: Here we are asking user to enter string. Using cin it able to read only one word at a time. I.e it w...
Q: B. Explain some business benefits of ERP Implementation.
A: Let us see the answer:- Introduction:- ERP is an abbreviation for Enterprise Resource Planning. ERP ...
Q: The Humane Society’s goal is to find adoptive homes for each of the animals in their care. Design a ...
A: lst=[]week=0tot=0num = int(input('How many days: '))for n in range(num): n = int(input('Enter num...
Q: Given the following sequence a0 = 2 al = 6 a2 = 10 a3 = 14 Find al00 O a. None of the choices is cor...
A:
Q: When the MPU starts up for the first time it goes to the and begins executing. Reset vector Interrup...
A: MPU is memory protection unit that provides memory protection.
Q: Discuss the principal threats to the operating system and the control techniques used to minimize th...
A: Some major threats of operating system : The following are a couple of the most well-known danger ve...
Q: Why is cybercrime becoming more common and more com
A: Introduction Why is cybercrime becoming more common and more complex?
Q: Import and edit the ShoppingCart02 project. • Declare and initialize numeric fields: – price (doub...
A: Code for Exercise (4) package shoppingcart02; public class ShoppingCart02 { public s...
Q: Please visit the website in the link provided below and perform the activity by using the Packet Tra...
A: Introduction: Layer 2 switching and Layer 3 routing are both possible with a multilayer switch like ...
Q: In the context of the impact of a change on an organization, How would you characterize the followin...
A: INTRODUCTION: Adding electronic scoreboards to cricket grounds: Viewers would be able to see the s...
Q: Visit the websites of three big technological companies (Microsoft, Oracle, and Cisco), as well as t...
A: Introduction : Websites dedicated to the most up-to-date information about security. Microsoft devel...
- Write a function inde which returns the index (start from 1) of the occurrence of a given value. Use helper function. Two functions are enough.
inde(1, [1,2,1,1,2,2,1]) → [1,3,4,7] - Write a function nele which repeats each element in a list n times. Use helper function. Two functions only.
nele([1,2],3) → [1,1,1,2,2,2] - Write a function isfact to determine if a positive integer is a factorial number. Do not use any formula such as T(n)=n(n+1)/2. Do it in recursive fashion. Two functions are enough.
isfact(120) → true
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Define the function (siftNum lst). This function should resolve to all the numbers in the list, lst. For example: (siftNum '(a 8 2 1 m l 90 p 2)) resolves to '(8 2 1 1 90 2).In Python: Write a recursive function named Multiply2 that multiples by 2 and prints each element in a given list. For example: mylist=[1,2,3,4] Multiply2(mylist) prints: 2 4 6 8 Note: the function takes only one parameter, which is the list on which the operation will be performed. It's ok if the list becomes empty after calling the function.Write a function that accepts two lists as it's only arguments. The function should return a new list containing all the elements of the two list arguments. For example, if the function was passed the lists [1, 2, 3] and [4, 5, 6], it would return a new list containing [1, 2, 3, 4, 5, 6]
- emacs/lisp function Write a function that takes one parameter that is a list of numbers and returns true (t) if all the elements of the list are multiples of the first one and nil otherwise. This said, a list generated by the function make-multiples could be passed to this new function and the result should be true. On the other hand, show an example of a list that could not have been generated by the first function for which the result is still true.Write a recursive function named Multiply2 that multiples by 2 and prints each element in a given list. For example: mylist=[1,2,3,4] Multiply2(mylist) prints: 2 4 6 8 Note: the function takes only one parameter, which is the list on which the operation will be performed.Write a function multiply_ends (nums) that takes a non-empty list of integers and returns the first integer multiplied by the last integer. For example, if nums is the list [5, 4, 6, 2], the function would return 5 * 2 = 10. If the list has only 1 element, the first and last elements are the same so the function should return the square of the element. For example: Test Result print(multiply_ends( [5, 4, 6, 2])) 10 Answer: (penalty regime: 0, 10, 20, ... %) 1 | Precheck Check
- Suppose, you are given a doubly linked list of student marks. Write down a function that checks whether the list is sorted in descending order or not. If the list is sorted, it will return true. Otherwise, it will return false. You must use the following structure to implement the function. 10 struct node double marks; node* next; node* prev; node* head, tail; For the following list, the function will return false. head tail 2.5 3.8 4.5 6.78 10Write a Python Code for the given function and conditions: Given function: def insert(self, newElement) Pre-condition: None. Post-condition: This method inserts newElement at the tail of the list. If an element with the same key as newElement already exists in the list, then it concludes the key already exists and does not insert the key.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.
- Max Absolute In List Function Lab Description Implement function max_abs_val(lst), which returns the maximum absolutevalue of the elements in list.For example, given a list lst: [-19, -3, 20, -1, 0, -25], the functionshould return 25. The name of the method should be max_abs_val and the method should take one parameter which is the list of values to test. Here is an example call to the function print(max_abs_val([-19, -3, 20, -1, 0, -25])) File Name maxabsinlst.py Score There are three tests each worth 2 points Note: You do not need any other code including the main method or any print statements. ONLY the max_abs_val method is required. Otherwise, the autograder will fail and be unable to grade your code. (I.e., do not include the above example in your code.) The above example should be used be test your code but deleted or comment out upon submission. PYTHON LABPart I Implementation In this part you are asked to write functions with python . Define a two dimensional list with NxN elements. This list should be filled with random numbers between 100 and 200. . Write a function that takes a table as a parameter and prints list elements with table shape • Write a function that takes a table as a parameter and return a list that holds diagonal (left-top corner to bottom-right) elements. Write a function that takes a table as a parameter and returns number of all odd numbers in the table Note: You are not allowed to use Numpy package. Part II TestPlease 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 7