Substring: Complete the following code to check if str2 with length strlen2 is a substrir str1 with length strlen1. Examples: str1=flower, str2=low (low is a substring of flower) str1=flower, str2=law (law is not a substring of flower) Algorithm: 1. Find the first character of str2 in str1. 2. If not found, str2 is not a substring of str1, else compare the remaining characters. 3. If all remaining characters matched, str2 is a substring of str1. Else, str2 is not a substring of strl. cld mov rcx, qword [strlen1]
Q: Write a program that resembles a phone book, which stores and displays the names, the addresses…
A: Hello student Greetings Hope you are doing great As you have not specified any particular language I…
Q: Client-dependent data is defined as data contained across all clients in the system. False O True
A: Answer in step 2
Q: Q4/ Convert the following algebraic expressions into expressions in Mat lab: 10t 11) y=-10 ()² +…
A: Hello student Good Morning Have a great day.
Q: Q5/By using Matlab write a program that will determine the price of traveler ticket based on…
A: Step-1: Start Step-2: Declare two variables age and price Step-3: Take input customer age and store…
Q: Describe the steps required in carrying out an instruction in a computer system.
A: Introduction: The execution of instruction consists of six phases. The instruction cycle (also known…
Q: * ?What is a File Descriptor O O A handle for machine specific structure of an open file A handle…
A: What is a File Descriptor? A handle for machine specific structure of an open file.
Q: "basic input/output system" is what the abbreviation "BIOS" refers to.
A: Given that: The BIOS, or basic input output system, is a system that is incorporated in every…
Q: WHY IS A LICENSE REQUIRED FOR ANYONE WHO WISHES TO WORK AS A PRIVATE SECURITY OFFICER?
A: Answer: Any person who wants to practice as a private security officer in any country needs to…
Q: Describe the waterfall model of development.
A: Introduction: Winston Royce purchased the Waterfall Model in the year 1970. It is a…
Q: Name and characterise the seven computer level hierarchies. This setup teaches us about computer…
A: Name and define the seven generally recognised levels of the Computer Level Hierarchy. What does…
Q: extensible stylesheet language transformation (XSLT)?
A: Extensible Stylesheet Language Transformations (XSLT) is also called XSL (Extensible Stylesheet…
Q: Give an overview of real-time operating systems before diving into particular instances. Compare and…
A: The performance of the system in real time: It is often utilised in situations when a high number of…
Q: Assume that no software code can be moved. How can the memory paging process be made more difficult?
A: Memory paging is a memory management mechanism used by computer operating systems to store and…
Q: Guice is a popular dependency injection library in the Java programming language. However, there are…
A: Introduction: Dependency Injection handles difficulties like how an application or class can be…
Q: When it comes to data backup and recovery, what are s most significant considerations?
A: Just because it's a backup doesn't imply it's safe; it's just a duplicate of the original and needs…
Q: What kind of connections may be made between human-computer interaction and information technology?…
A: Introduction: Human-computer interaction (HCI) focuses on the design of computer technology,…
Q: Is it feasible for a MAC address to be shared by two different network interfaces? Is there a reason…
A: Introduction: When a computer connects to a network, whether it be public or private, this is known…
Q: The read position advances towards the end of the file when items from the file are read. the report…
A: The question is to find the given statement is true or false.
Q: The link between the four information system functions will be examined, and a visual to depict the…
A: Introduction: Information system hardware includes computers, tablets, cellphones, and disc drives.…
Q: Is there any such thing as "Middleware?"
A: Given Question: Does "Middleware" actually exist?
Q: Why should you study so many laws of normalisation? What effect does normalisation have on the…
A: Why should you study so many laws of normalisation : Normalization is the process of structuring and…
Q: When it comes to data backup and recovery, what are some of the most significant considerations?
A: The significant considerations when comes to data backup and recovery are as follows: Establishing…
Q: Polymorphism allows the addition of classes
A: The Answer is given below step.
Q: :Select the correct answer * :PDA can be represented with the help of Instantaneous description…
A: Here is the solution:
Q: Discuss the testability suggestion and provide an overview of the compiler.
A: Answer:- Testability Tips The following are the complete testability tip, 1. Make use of hidden…
Q: If p is true , q is true and r is false; what is the truth value of (p∨∼q)∧r? a. true b. false
A: As given, we need to find out the truth value of the given statement (p∨∼q)∧r.
Q: VM live migration is suitable for which of the following scenarios ? load balancing among datacenter…
A: In this question we have to understand when the live VM migration should be suitable according to…
Q: What are the real-world ramifications of a software flaw?
A: Software testing will always be non-negotiable, no matter how far technology has progressed. Every…
Q: What role does Model-View-Controller (or MVC) have in the development of internet applications in…
A: Answer: Model-View-Controller(MVC): -> MVC separates the business logic from the presentation…
Q: Why is it essential for a systems analyst to have some level of language proficiency? Who are the…
A: A systems analyst must be able to interpret technical information into plain English: For…
Q: Write an assembly program that would behave as the following if statement: if (A > 10): X = 2 else…
A: Here i give a answer as much as possible:
Q: Q5/By using Matlab write a program that will determine the price of traveler ticket based on…
A: %5%matlab program to determine the price of traveler ticket based on ageage = input('Enter your…
Q: O O An object of the fstream class, so what is the default mode to open the file the default mode…
A: Answer is in next Step
Q: Normal communications no longer use "save and forward" Check the mechanics.
A: Given: The technique known as a "store and forward network" is not used in day-to-day communications…
Q: Trace all computation for the input string abbbccc in M then answer about these questions: a, E-E E,…
A: Here i am tracing the above…
Q: The use of electronic mail to communicate in today's society has two (2) benefits over the use of…
A: Identify two advantages of using electronic mail to communicate in today's society over traditional…
Q: Write a program that takes a list of students" names and marks and calculates the average marks. You…
A: The Answer start from step-2.
Q: O O Adding a derived class to a base class requires substantial changes to the base class
A: Answer is in second step
Q: A- Correct the errors in each of the following statements: 1- if (age >= 65 ); else; 2- if (age >=…
A: 1. if (age >=65); cout<<"Age is greater than or equal to65"<<endl; else;…
Q: A hash function h defined h(k) = k mod 8, with linear probing, is used to insert the keys 54, 45,…
A:
Q: In what ways are layer 2 and 3 switches different? If you were to buy a switch, which one would you…
A: MAC Address: Each device on a network is identified only by its Media Access Control address (MAC…
Q: Write a program in C++ that finds the following form using an expression while loop 0 12 345 6789
A: Here we are given a programming task in which we are required to generate the following pattern…
Q: Q4/ Convert the following algebraic expressions into expressions in Mat lab: OF DIL 11) y = -10 -10…
A: The above expression can be simplified in order to execute in MATLAB as: Divide each expression into…
Q: Q5/ By using Matlab write a program that will determine the price of traveler ticket based on…
A: The above program makes use of input function in MATLAB that is defined to take user input and takes…
Q: What is ISO, and why is it so important to system developers?
A: Start: The International Standards Organisation (ISO) is a large organisation that adheres to…
Q: In what way do individuals refer to a "memory void" when they say they have one? What causes it, and…
A: INTRODUCTION Memory Gap: One method for allocating contiguous memory is to split all available…
Q: Dot-matrix printers are output devices.
A: Devices for Output: Dot Matrix Printers are a kind of printer that uses dots instead of pixels.…
Q: Uneven memory access is a concept that has yet to be fully explained.
A: Given: The delay that occurs in data transmission when data transfers between computer RAM and the…
Q: It is not possible to achieve inheritance of structures in ?++C
A: Introduction: Below describe the whether it possible or not to achieve inheritance of structures in…
Q: computer science - Users of the Internet can choose between two sorts of services. What…
A: Introduction: There are two sorts of services. Services of Communication Services for information.
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Step by step
Solved in 2 steps
- Soundex System Soundex is a system that encodes a word into a letter followed by three digtis that roughly describe how the word sounds. That is, similar sounding words have similar four-character codes. For instance, the words carrot and caret are both coded as C123. A slight variation of the Soundex coding algorithm is as follows: 1. Retain the first letter. 2. For the remaining letters, delete all occurrences of a, e, i, o, u, h, y, and w. 3. Replace the letters that remain with numbers so that (a) b, f, p, and v become 1 (b) c, g, j, k, q, s, x, and z become 2 (c) d and t both become 3 (d) l (that is, el) becomes 4 (e) m and n become 5 (f) r becomes 6 4. If the result contains two adjacent identical digits, eliminate the second of them. 5. Keep only the first four characters of what you have left. If you have fewer than four, then add zeros on the end to make the string have length four. Write a program that carries out the algorithm. See Fig. 6.86.Soundex System Soundex is a system that encodes a word into a letter followed by three digtis that roughly describe how the word sounds. That is, similar sounding words have similar four-character codes. For instance, the words carrot and caret are both coded as C123. A slight variation of the Soundex coding algorithm is as follows: 1. Retain the first letter. 2. For the remaining letters, delete all occurrences of a, e, i, o, u, h, y, and w. 3. Replace the letters that remain with numbers so that (a) b, f, p, and v become 1 (b) c, g, j, k, q, s, x, and z become 2 (c) d and t both become 3 (d) l (that is, el) becomes 4 (e) m and n become 5 (f) r becomes 6 4. If the result contains two adjacent identical digits, eliminate the second of them. 5. Keep only the first four characters of what you have left. If you have fewer than four, then add zeros on the end to make the string have length four. Write a program that carries out the algorithm. See Fig. 6.86. THIS IS DONE IN VISUAL BASICWrite code using the in operator that determines whether 'd' is in mystring.
- Question 1 Not complete Marked out of 1.00 Flag question Write a recursive function named count_non_digits (word) which takes a string as a parameter and returns the number of non-digits in the parameter string. The function should return 0 if the parameter string contains only digits. Note: you may not use loops of any kind. You must use recursion to solve this problem. You can assume that the parameter string is not empty. For example: Test Result print(count_non_digits ('123')) print(count_non_digits ('2rPTy5')) print(count_non_digits ('hello world')) 11 Precheck Check 0 4 Answer: (penalty regime: 0, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 %) 17. DIY Pattern by CodeChum Admin Step right up and create the patterni Whoever gets all patterns right willbe crowned the new King of Petterns and gets to brag about it to their friends. Here are the instructions: you will be given 4 numbers; each number corresponds to the amount of times a symbol is repested in the pattern. That's pretty much it. Good lack Symbels: nl n2 -1 n3 =/ n4. input 1. Value of nt Constraints The value is >- n3 2. Valua of n2 Constraints The value is greater than 0. 3. Value of naString Pair // Problem Description // One person hands over the list of digits to Mr. String, But Mr. String understands only strings. Within strings also he understands only vowels. Mr. String needs your help to find the total number of pairs which add up to a certain digit D. // The rules to calculate digit D are as follow // Take all digits and convert them into their textual representation // Next, sum up the number of vowels i.e. {a, e, i, o, u} from all textual representation // This sum is digit D // Now, once digit D is known find out all unordered pairs of numbers in input whose sum is equal to D. Refer example section for better understanding. // Constraints // 1 <= N <= 100 // 1 <= value of each element in second line of input <= 100 // Number 100, if and when it appears in input should be converted to textual representation as hundred and not as one hundred. Hence number…
- Broken Cabins Problem Statement: There is an Office consisting of m cabins enumerated from 1 to m. Each cabin is 1 meter long. Sadly, some cabins are broken and need to be repaired. You have an infinitely long repair tape. You want to cut some pieces from the tape and use them to cover all of the broken cabins. To be precise, a piece of tape of integer length t placed at some positions will cover segments 5,5+1-sit-1. You are allowed to cover non-broken cabins, it is also possible that some pieces of tape will overlap. Time is money, so you want to cut at most k continuous pieces of tape to cover all the broken cabins. What is the minimum total length of these pieces? Input Format The first line contains three integers n,m and k(1sns10°, namsloº, Isksn) - the number of broken cabins, the length of the stick and the maximum number of pieces you can use The second line contains n integers bl,b2,bn (Isbism) - the positions of the broken cabins. These integers are given in increasing…Treasure Hunter description You are in front of a cave that has treasures. The cave canrepresented in a grid which has rows numbered from 1to , and of the columns numbered from 1 to . For this problem, define (?, )is the tile that is in the -th row and -column.There is a character in each tile, which indicates the type of that tile.Tiles can be floors, walls, or treasures that are sequentially representedwith the characters '.' (period), '#' (hashmark), and '*' (asterisk). You can passfloor and treasure tiles, but can't get past wall tiles.Initially, you are in a tile (??, ). You want to visit all the treasure squares, andtake the treasure. If you visit the treasure chest, then treasurewill be instantly taken, then the tile turns into a floor.In a move, if you are in a tile (?, ), then you can move tosquares immediately above (? 1, ), right (?, + 1), bottom (? + 1, ), and left (?, 1) of thecurrent plot. The tile you visit must not be off the grid, and must not be awall patch.Determine…Computer Science Question Lab There is only one list of N ingredients in the menu. Every ingredient has its beauty value that does not depend on its taste, but on the way it looks, which is expressed as a positive integer. To order a dish, the customer asks Ramsay to use all the ingredients from L to R (L is strictly less than R). Ramsay knows that the dish will be tasty and not only beautiful if the sum of its ingredients' beauty values is divisible by K. Ramsay does not want to use all the ingredients, so he always excludes one of them. Which one? - The least beautiful one! (in other words - which has the minimal beauty value). Now he wonders - how many segments (L,R) are there such that the sum of their beauty values will be divisible by K after excluding the least beautiful ingredient. Your assignment is to develop a python code that prints the answer for the problem. Sample test case are given below:Input:3 51 2 3Output:1
- Python Language Useful websites: : http://en.wikipedia.org/wiki/Radix http://www.purplemath.com/modules/numbbase.htm Special Rules: Use only Boolean/math expressions and conditional statements (if-statements). Do not use built-in functions for converting integers into a string representation. Here to start with: kthDigit(x: int, b: int, k: int) -> int .........Target The aim of this work is to use control structures and loops. Read carefully the problem and understand what needs to be done. Read your description is given and when you understand how it works, then start designing its solution and its implementation on the computer applying the syntax and semantics of the language Java programming. Write a LongestDupSubstring.java program that accepts a string as input and compute and print the longest sub-string displayed in two times without overlap (see 5th example for overlap). If there are more from one of such sub-strings, the program displays the first one it finds as well the number of characters in the substring. If there is no substring that appears 2 times, then the program will not print anything. Execution examples (the user's input is red and the longer in length 2 substrings) 1 Example Give a string: again and again Longest substring: again Longest substring size: 5 2 Example Give a string: seven saints and seven dinners Longest…Find the error/s in the following code, highlight and write the correct code on a piece of paper. 1. discr == b*b - 4*a*c; if discr < 0 disp(’Warning: discriminant is negative, roots are imaginary’) else discr =0 disp(’Discriminant is zero, roots are repeated’) elseif disp(’Roots are real’) end 2. n = 5;A = eye(n):for j=2,n for i=1:j-1 A(i,j)=i/j; A[j,i]=i/j; Endend