Use Clojure: a. The built-in function type is useful for checking what kind of object an expression evaluates to. Write a function both-same-type? that takes two arguments, and returns true when they both have the same type, and false otherwise. b. Write a function list-longer-than? which takes two arguments: an integer n, and a list lst and returns true if lst has more than n elements, and false otherwise. For example, (list-longer-than? 3 '(1 2 3)) should return false, and (list-longer-than? 2 '(1 2 3)) should return true.
Q: The fundamentals of Machine Language are simple to articulate. Also, why do computers and other tech…
A: The answer is given below step.
Q: How do surrogate keys obtain their values?
A: 1. A database management system (or DBMS). 2. It is essentially just a computer-based data storage…
Q: A primer on Internet of Things (IoT) security, potential threats, and societal effects.
A: Introduction: An overview of IoT security, IoT dangers, and their effects on society.
Q: The concept of risk is interpreted differently by network/OS systems. Finally, do you have any…
A: Introduction Hazard and risk are two related concepts in safety management and risk management. A…
Q: Explain what the InfoSec program is and how it relates to computer science.
A: InfoSec program: An InfoSec program is a comprehensive set of policies and procedures designed to…
Q: een a disgui
A: Introduction: The least expensive software is ROM, but it has limited adaptability, while OTP and…
Q: Suppose three algorithms A, B, and C, can be implemented to perform a task. The algorithms have the…
A: The time complexities of the algorithms are as follows: A: O(n) B: O(n^2) C O(log2(n)) To rank the…
Q: In your opinion, how could the effectiveness of a security protocol, such as TLS, be minimized if…
A: Introduction A security protocol is a set of rules and guidelines used to ensure the secure exchange…
Q: The goal for Lab07 is to use the provided Student class and create an array of Student objects that…
A: Your answer is :
Q: (1) Choose your initial question from the two questions below, and (2) Respond to another student's…
A: Argument supporting the view that e-commerce will cause states and local governments to lose tax…
Q: arallel Lists ummary this lab, you use what you have learned about parallel lists to complete a…
A: ALGORITHM : 1. Declare variables for the number of items in the list, the list of add-ins, the list…
Q: Describe a real-time operating system (RTOS) and provide some instances of how it is used in…
A: In this question we need to explain Real-Time Operating System (RTOS) and its practical uses.…
Q: 6. Draw the heap that results from adding the following integers (34 45 3 87 65 32 1 12 17).
A: Introduction: Heap sort is a comparison-based sorting algorithm that is based on the Binary Heap…
Q: You are using the Insertion Sort algorithm on the following array: 0 6 7 8 3 3 46 5 1) 0 2) 0 3) 0…
A: We need to answer questions based on insertion sort algorithm.
Q: Name a few issues plaguing the world's information systems and provide a short explanation of their…
A: Introduction : An information system is a combination of hardware, software, data, people, and…
Q: You may use a table to compare the features, advantages, cost, and usability of Pfsense, Opnsense,…
A: Sense: Nonsense: Windows and Linux users may use BSD-based Untangle Sense firewall. Nonsense is a…
Q: What types of network media do you have in your network at home? What types of media are obsolete…
A: A computer network is a set of computers in which computers share their resources with each other.…
Q: Authentication and access control in IT security need to be investigated.
A: System logins: System access: Access control restricts access to computer resources. This security…
Q: Write a C Program that will compute for npr (n taken r permutations).
A: Approach Start Include header files Declaration of the function prototype Main method Variable…
Q: What safety steps can a business take to protect itself against cyberattacks and virus infections?
A: Introduction: Take into account the following steps to collect sensitive data for your business and…
Q: Can you provide an example of how virtual servers are utilized in education?
A: The use of VDI-based virtual learning infrastructure can be quite advantageous for the education…
Q: In order to assist in locating the cause(s) of this issue, how would you classify the data according…
A: The first step in the process of stratification is known as the sorting of data, people, and items…
Q: Explain the idea of a challenge-and-response security protocol (CRAS). As opposed to using a…
A: Introduction: Client-server systems often use password-based authentication. However, since the…
Q: Investigate the challenges faced by data systems by digging into the numbers.
A: Introduction: This topic explores the challenges information systems encounter as a result of their…
Q: To what end does authentication serve? Examine the pros and cons of various verification techniques.
A: By allowing only authorised users or processes to access their protected resources, authentication…
Q: Write a C++ program that reads in one decimal number, and then outputs whether the number is…
A: Introduction: If a given condition is true, use the if statement to describe a block of code that…
Q: 1__Implement the following: 1) Use a loop to continuously request an integer input from the console.…
A: Algorithm: START Initialize the sum to 0. Take input from the user. Check if the input is between…
Q: In the event of a data breach, what are the company's procedures for communicating the situation to…
A: Introduction: A data breach is an unauthorized access to or disclosure of confidential or sensitive…
Q: The two primary roles of an OS should be quickly explained.
A: An operating system (OS) is the software that controls all other application programmes in a…
Q: In an internet networking environment, TCP/IP protocol suite performs different networking functions…
A: The OSI model and the TCP/IP protocol suite are two different models that are used to describe the…
Q: Find whether the given loop executes infinitely or not? Justify your answer. for(; 2 !=1 ; )
A: The given loop will execute infinitely because the condition in the for loop header (2 != 1) will…
Q: Discuss different operating systems' file management mechanisms. How can you detect the difference…
A: The process of arranging and monitoring files and folders is known as file management. Keeping files…
Q: represent
A: Code: #include <iostream>using namespace std;#define FRAC_Hclass Fraction {…
Q: What function does the data dictionary serve inside the DBLC procedure
A: Firstly, what is DBLC , ?? So, it is "" Database Life Cycle "" in short (DBLC) it involves the 6…
Q: Part a) Consider an undirected network of size N in which each node has degree k = 1. Which…
A: undirected graph is used to measure the number of edges compared to the number of nodes.
Q: Examine the importance and characteristics of database backups. Procedures for restitution Then,…
A: Backing up your data is an important component of protecting the security of your data. Database…
Q: Which of DBLC's six stages does the data dictionary contribute to?
A: Encyclopaedia of data: The data dictionary is an essential component of a relational database…
Q: Complete the given blanks such that all elements of arr are incremented with 10 after the execution.…
A: Algorithm: START Create a function named fun that takes in one parameter, ele. Inside the…
Q: How do you intend to prevent the four most prevalent causes of database failures?
A: There are wide different varieties of data corruption. The Failings of the Media A person has…
Q: Let's pretend you had to create an operating system from the ground up. Please specify whether or…
A: The list below includes an operating system's most important functions. 1. Memory control. 2.…
Q: Defining and elaborating on the term "cybersecurity" is crucial.
A: Cyber security protects computers, networks, and data against attacks.Information technology…
Q: There is a wide selection of industry-standard utilities and diagnostic tools for handling network…
A: Standard tools control and diagnose network issues. Describe your workstation performance and…
Q: This programming assignment is a user input validator. Acceptable input is zero or more characters…
A: Algorithm of the code: 1. Start 2. Prompt the user to enter a regular expression. 3. Create a…
Q: P3) Give the recurrence formula for the running time for the following code. P3(int n) { if (n <=…
A: The recurrence formula for the running time of the above code can be determined by analyzing the…
Q: What should happen if the processor issues a request during block writing from the write buffer to…
A: A buffer is used to compensate for the difference in speed between two processes exchanging or using…
Q: Discuss the future of artificial intelligence in light of its current advancements.
A: The above question that is the future of artificial intelligence in light of its current…
Q: llowing absolute value function as a piec f(x)=|-x^(2)+9x-18| Please give proper explanation…
A: The absolute value function is defined as the distance between a number and zero on the number line.…
Q: Talking about the inner workings of an OS is beyond the scope of our knowledge.
A: The system's basic unit of work is a process. In other words, we construct our computer programmer…
Q: Which of the following statements is true? OA After one year of no sales to a customer, QuickBooks…
A: customer, you can deactivate them, which will hide them from listings and offers but we won't remove…
Q: Please provide at least five justifications for the vitality of cyber security.
A: In this question we need to explain at least five importance of cyber security.
Use Clojure:
a. The built-in function type is useful for checking what kind of object an expression evaluates to. Write a function both-same-type? that takes two arguments, and returns true when they both have the same type, and false otherwise.
b. Write a function list-longer-than? which takes two arguments: an integer n, and a list lst and returns true if lst has more than n elements, and false otherwise. For example, (list-longer-than? 3 '(1 2 3)) should return false, and (list-longer-than? 2 '(1 2 3)) should return true.
Step by step
Solved in 4 steps with 4 images
- Finally, create your own example of a function that modifies a list passed in as an argument. Describe what your function does in terms of arguments, parameters, objects, and references.Question 4: Write a function that takes three lists of integers, l1, l2, and l3, and returns a 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 sorted according to a and b, in ascending order. """ def threeLists(l1, l2, l3):Use Clojure to complete these questions: Please note that this is the beginning of the course so please use simple methods possible, thanks a. The built-in function type is useful for checking what kind of object an expression evaluates to. Write a function both-same-type? that takes two arguments, and returns true when they both have the same type, and false otherwise. b. Write a function list-longer-than? which takes two arguments: an integer n, and a list lst and returns true if lst has more than n elements, and false otherwise. For example, (list-longer-than? 3 '(1 2 3)) should return false, and (list-longer-than? 2 '(1 2 3)) should return true. c. See attached picture.
- 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.75Write 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 return‘Write a function nesting(), which takes an arbitrary number of parameters, and returns a list containing the arguments. Write another function unnesting(), which takes a list L as the parameter and retums a 1D list. Notice that, you should be able to use loops to solve thisproblem and should not use recursive functions (which we will not cover in this course). ‘Write assertions to test the two functions.For example nesting(1, nesting(2, 3, nesting(4, 5, [6])), [7, 8], 9)unnesting([1, [2, 3, [4, 5, [6]]], [7. 8], 9]) (1, [2, 3, [4, 5, [6]]], [7, 8], 9][1, 2,3, 4, 5, 6, 7, 8 9]
- Write in C++ Now, what if Sam wants to insert Eevee after Pikachu but he doesn't know where Pikachu is located in his list. Let's help him search for a Pokemon by its name and insert another Pokemon directly after it. Write a function secondPlace() that takes six parameters and inserts a new Pokemon into a list right after another specified pokemon. Once you find the specified Pokemon, use the insertAfter() function from the previous sub-question to add the new Pokemon. The function should return the new number of strings in the array. Note The same Pokemon may appear in the list multiple times (Sam has a bad memory). Assume that Sam wants every instance of the Pokemon he is searching for to be followed by the Pokemon he is attempting to insert. If the array is already full or if the number of strings that are going to be added to the array plus the current number of strings exceeds the total size of the array, the array should remain unchanged. Assume all inputs are lowercase…You are tasked with helping write part of an exciting new word-guessing game, “Durdle”. The game is one in which a player attempts to guess a five-letter word in successive guesses. In this problem and the next one, we will build an implementation of this word-guessing game. First, to support this game, we will write a function named durdle_match(guess, target) that takes in two strings - a player’s guess, and the target word that the player is attempting to guess. Each of the given words is five letters long. This function should return a five-letter string consisting of the letters B, G, and Y that has a meaning associated with the guess as follows: B: This letter in the guess does not appear in the target string Y: This letter in the guess appears in the target string in another location G: This letter in the guess appears in the same location in the target string(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…
- 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):Write a function in C++ "replaceVowels()" with no return value to replace all the vowels (A, E, I, O, U) from 8 randomly selected letters from the alphabet with a symbol from the list ($ % @ # &). That is, A must be replaced by $, E replaced by %, I must be replaced by @, O replaced by #, and U must be replaced by &. The function receives the address of the first characters of the password string as parameter. Display the password from the main() function. An Example Output is given in the following image.Question: First write a function mulByDigit :: Int -> BigInt -> BigInt which takes an integer digit and a big integer, and returns the big integer list which is the result of multiplying the big integer with the digit. You should get the following behavior: ghci> mulByDigit 9 [9,9,9,9] [8,9,9,9,1] Your implementation should not be recursive. Now, using mulByDigit, fill in the implementation of bigMul :: BigInt -> BigInt -> BigInt Again, you have to fill in implementations for f , base , args only. Once you are done, you should get the following behavior at the prompt: ghci> bigMul [9,9,9,9] [9,9,9,9] [9,9,9,8,0,0,0,1] ghci> bigMul [9,9,9,9,9] [9,9,9,9,9] [9,9,9,9,8,0,0,0,0,1] ghci> bigMul [4,3,7,2] [1,6,3,2,9] [7,1,3,9,0,3,8,8] ghci> bigMul [9,9,9,9] [0] [] Your implementation should not be recursive. Code: import Prelude hiding (replicate, sum)import Data.List (foldl') foldLeft :: (a -> b -> a) -> a -> [b] -> afoldLeft =…