11. Write a function that returns the minimum, maximum and the average value of an array passed as a parameter. 12. Write a function that takes a string as parameter and returns the number of words in that string. 13. Write a function that takes a string as a parameter, changes all the letters to uppercase letters and returns the updated string.
Q: How do the SPEC CPU tests address issues with Whetstone, Dhrystone, and Linpack?
A: Introduction: The SPEC CPU benchmark tackles the shortcomings of the Dhrystone, Whetstone, and Linpa...
Q: With the assistance of an example, distinguish between polymorphism and overloading.
A: Polymorphism can be said as the fact that something exists in multiple forms. Polymorphism, in simpl...
Q: What are the circumstances that cause a system to get stuck in a deadlock?
A: Four conditions are the necessary conditions for causing a system to get stuck in a deadlock:- Mutu...
Q: What has changed as a result of the widespread usage of the internet in software systems and softwar...
A: The Answer is in step2
Q: An algorithm with running time E(/n(log n)²) spends exactly 1 millisecond to process an input of 1.0...
A: For processing 216 items 20.48 milliseconds required.
Q: Define the terms "spatial locality" and "temporal locality," and explain how caches are used to boos...
A: Spatial Locality: A memory access's spatial locality is a property. It refers to the notion that th...
Q: What are the benefits and drawbacks of utilizing a file integrity checker like Tripwire? This is a f...
A: Introduction: What are the advantages and disadvantages of employing a file integrity checker such a...
Q: Computer science Extend your explanation of the notion of holographic storage.
A: Introduction: Three-dimensional (3D) data storage is used in holographic storage, which is a new mea...
Q: 2. The second integer is the result 2. Furthermore, you are provided with the getExponent() function...
A: Step-1: StartStep-2: Declare three integer variable base, result, exponentStep-3: Take input from us...
Q: Given divisor is 1101 • Data is 100100 Find the CRC and check for the error detection at the receiv...
A: Given divisor is 1101 Data is 100100
Q: MAKE PSEUDOCODE OR FLOW CHART FOR THIS CODE
A: A flowchart is a type of diagram that represents a workflow or process.
Q: Perform the layer wise detailed comparison of TCP IP and OSI reference model (note: use diagram for ...
A: Solution: The OSI stand for Open System Interconnection , it is the conceptual model used for the ne...
Q: An extranet is a business intranet that is developed utilising internet and World Wide Web standards...
A: Answer: The given statement is FALSE. An extranet is a business intranet that is developed utilizing...
Q: Please implement it with Java. Heap sort SORTEXAMPLE Heap construction start: SORTLEXAMPEE SORT...
A: The code implementation is given below.
Q: vailability of
A: LAN A network that is limited to a single location is referred to as a "local area network." A LAN ...
Q: What exactly is ACL in networking?
A: Introduction: The term "access-list" refers to a collection of rules that are used to regulate netwo...
Q: Suppose you have the following sorted list [3, 5, 6, 8, 11, 12, 14, 15, 17, 18] and are using the bi...
A: Option A : 11,5,6,8
Q: Write a C program thal takes N as input. Print a binery sequence 0, 01, 0110, 01101001.. up to N ter...
A: The binary number is a number system representation that used two digits 0 and 1 only, thus having a...
Q: What are a few of the benefits of data profiling?
A: Introduction: Data profiling improves data quality, reduces the time required to complete major proj...
Q: Why is it that the CPU normally only interacts with memory? (Recall that input and output normally t...
A: Introduction: The CPU accesses memory in an obvious order. Regardless of whether it originates from ...
Q: how to (individually) utilize remote access?the method and use?
A: Please find the answer and detailed explanation in the following steps.
Q: Computer Science Describe how a use case (interaction between user and system) can be used to ident...
A: The use case portrays the collaboration between the client and the framework or system. The client s...
Q: How does data visualisation help with decision making?
A: Introduction: A visualisation can transmit this data nearly instantly, allowing our brains to create...
Q: Among TCP and UDP connections, which connection do you think is the fastest and safest way to dissem...
A: In this question, we have to discuss about TCP and UDP protocols. We will try to get all knowledge r...
Q: Solve the problem in C++ (Count occurrence of numbers) Write a program that reads at most 100 inte...
A: Introduction Solve the problem in C++ (Count occurrence of numbers) Write a program that reads at ...
Q: Please answer it in Python write a function word_vers_dictionary(word), which takes a word (string...
A: According to company guidelines we are supposed to answer only one question. Kindly repost other que...
Q: How would you describe geographic information systems (GIS)?
A: geographic information systems (GIS)
Q: Tunneling over a network may be accomplished by the use of a point-to-point transport layer protocol...
A: Tunneling over a network may be accomplished by the use of a point-to-point transport layer protocol...
Q: What is the difference between system image and transform mapping?
A: Introduction: To map a DFD with transform flow characteristics into an architectural style, a series...
Q: Create a python program a. Create a user-defined array for any size n determined/chosen by the user...
A: Introduction: A prime number is a natural number greater than 1 that has no positive divisors other...
Q: Many businesses are starting to employ big data these days. Discuss it, including how and why the or...
A: Big Data is a collection of data that is huge in volume, yet growing exponentially with time.
Q: DAG Constant Folding Algorithm Examine a DAG recursively and collapse all operators two constants in...
A: Lets see the solution.
Q: d the number of addresses of a network whose one of the IP addresses is 72.280.220.112 / 27.
A: IP address A string of integers separated by periods makes up an IP address. IP addresses are made ...
Q: Bob takes medication three times a day. In the morning at 8:00, in the afternoon at 13:00, and in th...
A: The Enum in C is a data type which contains a fixed set of constants. The enum constants are implici...
Q: Which cloud management technique executes a series of tasks in a workflow? Automation IaC SLA Or...
A: -answer is Orchestration -orchestration is a cloud management technique in which ...
Q: What are the roles of the controls and widgets in a web form, and what is the goal of an online form...
A: Introduction: What are the roles of the controls and widgets in a web form, and what is the goal of ...
Q: SQL question SQL: employee table (id, salary) return kth highest salary
A: SELECT * FROM (SELECT ID, SALARY, DENSE_RANK()OVER(ORDER BY SALARY DESC) R FROM EMPLOYEE)WHERE R = K...
Q: What are the benefits if you have fibre-to-the-home or fibre-to-the-business or the drawbacks if you...
A: --benefits of having fibre to the home -almost zero buffering. -super-fast download and upload. -imp...
Q: Using Switch statement, write a program that displays the following menu for the food items availabl...
A: The choice and quantity will be the input Based on input choice we implement a switch block to displ...
Q: ite a for-loop that will print the pattern xxxxx; the character 'x' may not occur mo
A: Lets see the solution.
Q: What are the primary features of cloud computing?
A: Introduction: Cloud computing is a concept that refers to the omnipotent and omniscient, rapid, and ...
Q: Draw Activity diagram for business process of meeting a new client A salesperson calls the client an...
A: There are 4 modules. Module: salesperson, client, consultant, corporate technician. All these module...
Q: Describe the procedures needed in acquiring data from a certain website's web service API calls. con...
A: APIs are composed of three components: A user is the one who submits a request. The client is the co...
Q: Write a C program using cin and cout codes that input and output name, address, and age to an approp...
A: Due to company policies I am compelled to solve only one question and that is the first question. Pl...
Q: there's five key challenges associated with big data. Propose a sixth key challenge. Why do you beli...
A: The sixth key challenge and belief that this poses a major challenge are
Q: please code in python Write a function that takes in a number and returns the sum of all primes les...
A: def isPrime(n): if n <= 1 : return False for i in range(2, n): if n % i == 0: return False ...
Q: What is a firewall's purpose, and how does one go about installing one?
A: Introduction: A firewall's two functions are network traffic monitoring and control.
Q: 49810 in hexadecimal 2ED16 in decimal F3B16 in binary
A: Here in this question we have given number and we have to convert it into appropriate base. 49810 i...
Q: What do you mean by security objectives?
A: Introduction: Security objectives are both necessary and important to information security.
Q: An analog signal Xa(t) = sin(480nt) + 3sin (720t) is sampled 600 times per second. (a) Determine the...
A: The Nyquist sampling rate specifies a sampling rate for a signal which is two times the highest or m...
Step by step
Solved in 4 steps
- // write a function that takes the input string and reverses it// example// argument: Hello// return: olleHfunction reverseThisString(string){ } // write a function that takes the input string and switches all uppercase characters to lowercase and lowercase charcaters to uppercase// example:// argument: Hello World// return: hELLO wORLDfunction swapCase(string) { } //convert array of numbers from farenheit to celcius// example:// argument: [23, 32, 41, 50, 59]// return: [-5, 0, 5, 10, 15]// hint: use Array.mapfunction toCelcius(array){ } //write a function that takes an input array and returns an array of booleans (>=75) or fail (<75)// example:// argument: [20, 30, 50, 80, 90, 100]// return: [false, false, false, true, true, true]// hint: use Array.mapfunction passOrFail(array){ } //write code that loops through the two variables returns an array ['2 is zwei', '3 is drei', '4 is vier', '5 is fünf', '6 is sechs']// example:// return: ['2 is zwei', '3 is drei', '4 is vier', '5 is…// Write a function that takes 1 argument, a string. // It returns true if the string is a palindrome (the same forwards and backwards). // It returns false if the string is not a palindrome. const isPalindrome = (string) => { // your code here... // Examples isPalindrome("cat") // returns false //isPalindrome("level") // returns true }1- Write a function that takes a word less than 25 characters long and returns the letter that word starts with (in capital letters). Frank starts with the letter F. 2- Write a function that has a string as formal parameter. The function then replaces all spaces and punctuation marks in the string with the asterisk (*). Here is a sample run: Nothing is impossible, the word itself says 'I'm possible'! Nothing*is*impossible**the*word*itself*says**I*m*possible** 3- Write a function that takes as input one line and reverses the words of the line. For example, birds and bees Reversed: bees and birds 4- Write a function that takes nouns (a string) as inputs and forms their plurals based on these rules: a. If noun ends in "y", remove the "y" and add "ies". b. If noun ends in "s","ch", or "sh", add "es". c. In all other cases, just add "s". (Test on the following: chair dairy boss circus fly dog church clue dish) chairs dairies bosses circuses flies dogs churches clues dishes Now create the…
- Write a function that reverses a string. The header of the function is: def reverse(s):Write a test program that prompts the user to enter a string, invokes the reverse function, and displays the reversed string.Exercise 1: Word Separator Write a program that accepts as input a sentence in which all of the words are run together, but the first character of each word is uppercase. Convert the sentence to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example the string StopAndSmellTheRoses. would be converted to “Stop and smell the roses.” Exercise 2: replaceSubstring Function Write a function named replaceSubstring. The function should accept three string object arguments. Let’s call them string1, string2, and string3. It should search string1 for all occurrences of string2. When it finds an occurrence of string2, it should replace it with string3. For example, suppose the three arguments have the following values: string1: “the dog jumped over the fence” string2: “the” string3: “that” With these three arguments, the function would return a string object with the value “that dog jumped over that fence.” Demonstrate the…4. Complete the function show_upper. This function takes one parameter - a string (s). It should return a string made up of all the upper-case characters in s. For example, if s is “aBdDEfgHijK” then show_upper should return “BDEHK”. It should return the upper-case string - not print it. Do not change anything outside show_upper.
- Scrabble Scrabble is a game where players get points by spelling words. Words are scored by adding together the point values of each individual letter. Define a function scrabble_score (word:str) -> int that takes a string word as input and returns the equivalent scrabble score for that word. score = {"a": 1, "c": 3, "f": 4, "i": 1, "1": 1, "o": 1, "r": 1, "u": 1, "t": 1, "x": 8, "z": 10} For example, "b": 3, "h": 4, "n": 1, Your Answer: == 20 assert scrabble_score("quick") assert scrabble_score("code") == 7 1 # Put your answer here 2 Submit "e": 1, "d": 2, "g": 2, "k": 5, "j": 8, "m": 3, "q": 10, "p": 3, "s": 1, "w": 4, "v": 4, "y": 4,Task 2: Implement the function Searchingstrings that allow to search a sub-string in a given string and display the: First occurrence, Last occurrence, First occurrence from a given index and Last occurrence from a given index. You can use the following String methods: string. IndexOf(searchvalue, start) return the position of the first occurrence of specified character(s) in a string. string.lastIndexOf(searchvalue, start) return the position of the last occurrence of specified character(s) in a string. You can use the following string to test your solution: var letters = "abcdefghijklmnopqrstuvwxyzabcdefghijklm"; Write the code in a separate.js and separate.html file.3. String (a) Write a Python function that accepts a string s and an integer n with a single digit (i.e., 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9) as its arguments, and returns a new string that replaces every digit n found in s by a new digit that equals to (n + 1) %10. The function returns an empty string if n is not a single digit integer or is negative. COMP132 Assignment #2 replace_string("He330", 3)-> "He440" "He331" replace_string("He330",0)-> replace_string("He330",-4) replace_string("He330", -> 12)-> 11 11 11 11 (b) Write a Python function that accepts a string as the argument, moves the first 3 characters of the string to the end, and prints it out. If the length of the string is less than 3, your function should print an error message. move_string ("Hello") ->loHel move_string ("Hi, My name is Mark.") -> My name is Mark. Hi, move_string ("Hi")->Invalid String
- Exercise Objectives Problem Description Write a program that reads a string and mirrors it around the middle character. Examples: abcd becomes cdab. abcde becomes deCab AhmadAlami becomes AlamiAhmad Page 1 of 2 Your program must: • Implement function void reflect (char* str) which receives a string (array of characters) and mirrors it. This function does not print anything. • Read from the user (in main()) a string and then print the string after calling function reflect(). • Use pointers and pointer arithmetic only. The use of array notation and/or functions from the string.h library is not allowed.Complete the check_character() function which has 2 parameters: A string, and a specified index. The function checks the character at the specified index of the string parameter, and returns a string based on the type of character at that location indicating if the character is a letter, digit, whitespace, or unknown character. Ex: The function calls below with the given arguments will return the following strings: check_character('happy birthday', 2) returns "Character 'p' is a letter"check_character('happy birthday', 5) returns "Character ' ' is a white space"check_character('happy birthday 2 you', 15) returns "Character '2' is a digit"check_character('happy birthday!', 14) returns "Character '!' is unknown" use python please def check_character(word, index): # Type your code here. if __name__ == '__main__': print(check_character('happy birthday', 2)) print(check_character('happy birthday', 5)) print(check_character('happy birthday 2 you', 15))…vowelIndex Write a function vowelIndex that accepts a word (a str) as an argument and returns the index of the first vowel in the word. If there is no vowel, -1 is returned. For this problem, both upper and lower case vowels count, and 'y' is not considered to be a vowel. Sample usage: >>> vowelIndex('hello') 1 >>> vowelIndex('string') 3 >>> vowelIndex('string') 3 >>> vowelIndex('BUY') 1 >>> vowelIndex('APPLE') 0 >>> vowelIndex('nymphly') -1 >>> vowelIndex('string')==3 True >>> vowel Index ('nymphly')==-1 True