Create a function that returns an Earned Run Average (ERA). An ERA is calculated by multiplying 9 by the quotient of Earned Runs Allowed er divided by ip Innings Pitched. In baseball statistics, innings are represented with a fractional part of .1 (1/3) or .2 (2/3) to represent the number of outs in an inning. A whole number or a number with a fractional part of .0 represents a full inning with three outs. Check the Resources tab for a deeper explanation. Examples era (22, 99) → 2.00 era (23, 99.1) → 2.08 era (24, 99.2) →2.17
Q: Explain the Pros and Cons of layer design?
A:
Q: Whether VRC error detection method is used for single bit error or burst error.
A:
Q: What is RG rating of coaxial cable?
A:
Q: Write a function that diagonally orders numbers in a n x n matrix, depending on which of the four…
A: Function plan: Create an array, temp of size size. Insert another array of size size for each index…
Q: A DMA module is transferring characters to main memory from an external device transmitting at 9600…
A: Answer the above question are as follows
Q: If a function returns a value, it should generally be called froma) an expression b) a different…
A: Let's see the solution
Q: Prove that (n + a)^b= Θ( nb ), b >
A: Here is the solution
Q: time
A: public class Mat{ static int n=4;static int m=3; static void transpose(int arr[][] , int arr1[][]){…
Q: What are the two types of time, and how are they different? Why does it make sense to have both…
A: Temporal database A temporal database is a database that has specific highlights that help…
Q: Explain the Pros and Cons of layer design?
A: Introduction: The network layer, often known as layer 3 of the OSI Open Systems Interconnection…
Q: What are the various types of comments used in ABAP programming?
A: Comments A comment is a clarification that is included in a program's source code to aid in…
Q: A Rajesh teaches a cooking class. The course is attended by NN students, numbered 11 to NN. The cook…
A: The first line of the input contains a single integer T denoting the number of test cases. The…
Q: your are required to Explain a spike in noise term?...
A: Noise in digital data is a single point that deviates from the preceding and following values by a…
Q: Write a Program to find the factorial of a given number using recursion and analyze the time…
A: Introduction: In this question, we are asked to write a java program the get the factorial and time…
Q: Given the following array, assuming entries start at index 1 0 1 75 2 17 3 68 4 10 5 3 (1) Draw the…
A:
Q: Write an improved version of the chaos . py program from Chapter 1 thatallows a user to input two…
A: Lets see the solution.
Q: ustrate the difference between recursion and iteration by giving its tim
A: Introduction: Below Program to illustrate the difference between recursion and iteration by giving…
Q: In a dual core processor, consider first four letters of your name coming as processes each having…
A: Assumptions and given data Given that the size of each process is equal to its ASCII code in MBs.…
Q: In this exercise, you are going to give a formal description of the algorithm for constructing the…
A: According to the question, we have to explain and describe the mathematical expressions for the…
Q: Write a non-member method for a "enqueue" that utilizes a doubly linked list. There are three…
A: BELOW ? COMPLETE SOLUTION REGARDING YOUR PROBLEMREGARDING
Q: Explain why transient synchronous communication has inherent scalability problems, and how these…
A: Transient communication A message is discarded by a communication server as soon as it cannot be…
Q: Find (49.3)10 - (00110110.0010), BCD = (?), ВС
A: The answer is
Q: Path MTU is the smallest MTU of any link on the current path (route) between two hosts. Assume we…
A:
Q: In the VAX, user page tables are located at virtual addresses in the system space. What is the…
A:
Q: 5. DISTANCE CONVERTER In the English measurement system, 1 yard equals 3 feet and 1 foot equals 12…
A: ANSWER:-
Q: In virtually all systems that include DMA modules, DMA access to main memory is given higher…
A: The answer to the question is given below:
Q: Someone has attempted to censor my strings by replacing every vowel with a *, 1*k* th*s. Luckily,…
A: Algorithm - Take input from the user. Now use the below logic - for (let i=0;i<vowels.length;…
Q: Input 1 gaga Output YES
A: Python program
Q: What does the CRC generator append to data unit?
A: When CRC generator appends a zero to data unit, it generates an all-zero CRC, which is equivalent to…
Q: Q: Suppose that in a sensor network measured temperatures are not times- tamped by the sensor, but…
A:
Q: Whether VRC error detection method is used for single bit error or burst error.
A: VRC can detect both single-bit and multiple-bit errors in a stream of data, making it a versatile…
Q: A successor to ASCII that includes characters from (nearly) all writtenlanguages isa) TELLI b)…
A: ASCII stands for American Standard Code for Information Interchange, it is a character encoding…
Q: Use straight line Cost Function in supervised learning problem? How it help you hypothesis with…
A: A straight line cost function is a mathematical function that describes the relationship between a…
Q: Suppose a computer sends a packet at the network layer to another computer somewhere in the…
A: The answer is given below.
Q: Review the Stata do-file written below thatsimulates the omitted variable bias. 1. Discuss the…
A: This report assesses the quality of the birth history data in 192 DHS surveys conducted since 1990.…
Q: The IBM System/370 architecture uses a two-level memory structure and refers to the two levels as…
A: The question has been answered in step2
Q: What does the command prompt look like in the R console? O +4 ? [1]
A: Introduction Both the software (referred to as the "environment") and the programming language used…
Q: Q: One of the modern devices that have (silently) crept into distributed tems are GPS receivers.…
A: The GPS is also known as Global Positioning System.
Q: a. Three processes share four resource units that can be reserved and released only one at a time.…
A: Answer is in next step.
Q: In a dual core processor, consider first four letters of your name coming as processes each having…
A: Answer is in next step.
Q: Define the process of Rearranging Loops to Increase Spatial Locality ?
A: Lets see the solution.
Q: iii) Determine if the graph below is flattenable and determine its chromatic number. Note: Justify…
A: Answer: We have done graph coloring and and also find the chromatic number so we will see in the…
Q: We need to use synchronous TDM and combine 20 digital sources, each of 100 Kbps. Each output slot…
A: Given information: The total number of digital sources is twenty. Each frame output slot has one bit…
Q: What are the return values of the following statements in R (a) 4==4 & 5==5 (b) 5! =5 | 6==6…
A: a)Here the first statement is 4==4 & 5==5 The == operator is used for Checking that if each…
Q: Explain why public key encryption is more useful for securing communi-cations on the Internet than…
A: Public key cryptography's main advantage is improved data and identity security at scale. The fact…
Q: With persistent communication, a receiver generally has its own local buffer where messages can be…
A: Background information A persistent communication server keeps a message for as long as it takes to…
Q: Write a declaration for floating-point variable lastVal that’s to retain its value between callsto…
A: Lets see the solution.
Q: The cook must participate in the presence before each class, i.e. call out the names of the students…
A: The first line of the input contains a single integer T denoting the number of test cases. The…
Q: Label the Recursion Requirements. int fact (int n) { int result; } if(n==1) return 1; result fact…
A: The following are the requirements for a successful recursion: Termination condition to break out…
Q: s and script
A: Algorithm - Design a method with one argument as an array. Now use the below logic to solve the…
Step by step
Solved in 2 steps with 1 images
- Write a function find_words_with_zz(text) that uses a regex to find the words in a given text that contain double 'zz'. The double 'zz' cannot be in the start and end of the word. Examples: >> find_words_with_zz("""Suddenly in the night, John woke up craving pizza and a sizzling piece of bacon topped with a drizzle of bbq sauce!""") ['pizza', 'sizzling', 'drizzle']Write a function find_phone_numbers(text, code='357') that uses a regex to find and extract all the Cypriot phone numbers in a given text sequence. A valid Cypriot phone number starts with either 00 or + followed by the country code 357 and afterwards, 8 numeric digits. Examples: >> find_phone_numbers("""dkdkkdldld +35799394903 dkdkfk 0035799802358 fkfkfld.\n dldld;s;sdd dkdk +30690040404 and +3579933040""") ['+35799394903', '0035799802358'] and also Write a function is_zip_code(zipcode) that uses a regex to test if a given string evaluates to a correct zip code. A correct zip code has a length of 6 characters with the 3 first being letters and followed by 3 digits. Examples: is_zip_code('ABC123') -> True is_zip_code('FYA598') -> True is_zip_code('wyz940') -> True is_zip_code('AB123') -> False is_zip_code('ABCD123') -> False is_zip_code('ABC12') -> FalseDefine a function called digits that accepts two integer numbers m and n , and that displays m rows of n columns using the following pattern of digits. The first row starts with 1, the second row with 2, and so on until the 10th row starts with 0. Then the counter returns to 1 for the 11th row, then to 2 for the 12th, etc. For columns, the numbers are always incremented by 1 from the previous column, Except for the 9 that goes to 0. For example, the call digits(4, 7) must produce: 1234567234567834567894567890and the call numbers(12, 23) must produce: 123456789012345678901232345678901234567890123434567890123456789012345456789012345678901234565678901234567890123456767890123456789012345678789012345678901234567898901234567890123456789090123456789012345678901012345678901234567890121234567890123456789012323456789012345678901234Note that your function should not return anything, only display at the console.
- //Write a function that loops through and console.log's the numbers from 1 to 100, except multiples of three, log (without quotes) "VERY GOOD" instead of the number, for the multiples of five, log (without quotes) "SUPER AWESOME". For numbers which are multiples of both three and five, log (without quotes) "VERY GOOD SUPER AWESOME" Console log out: 12VERY GOOD4SUPER AWESOMEVERY GOOD78VERY GOODSUPER AWESOME11VERY GOOD1314VERY GOOD SUPER AWESOME1617VERY GOOD19SUPER AWESOMEVERY GOOD2223VERY GOODSUPER AWESOME26VERY GOOD2829VERY GOOD SUPER AWESOMEWrite a function ConvertToFahrenheit which takes a Celsius temperature and return its equivalent in Fahrenheit. F = (C × 1.8) + 323. Find Relatively PrimeWrite a function to return a number that is relatively prime with the given number. /* return an integer that is relatively prime with n, and greater than 1i.e., the gcd of the returned int and n is 1 Note: Although gcd(n,n-1)=1, we don't want to return n-1*/int RelativelyPrime (int n)
- Write a program which will take marks of three quizzes as input, then call a function void ScaleUp(float q1, float q2, float q3) to check if the marks of any of the quiz ‘q’ is less than the average of rest of two quizzes ‘a’. If marks of any quiz is less than the average of the rest of two marks then add the difference between the average of the two quizzes and the quiz itself to q i.e., q = a - q, to scale up the quiz marks.For example, if q1 = 5, q2 = 8 and q3 = 9 then your function will change the marks of quiz 1 using the steps below:A = (q3 + q2 )/2 => (8+9)/2=> 8.5 Diff = A - q1 => 8.5 - 5 => 3.5 Q1 = Q1 + Diff => 5 + 3.5 => 8.5Note that the marks are input from the user, so there might be three cases I. if q1 < q2 + q3 orIi. if q2 < q1 + q3 orIii. if q3 < q1 + q2Write a function that converts a phrase into pig Latin. A word is convertedto pig Latin by removing the first character of the word, placing it at theback of the word, and adding the characters “ay” to the word. For example,“hello world” in pig Latin is “ellohay orldway.” Your function can assumethat each word consists of at least two letters and that each word is separatedby one space, with no punctuation marks.To translate a sentence into pig Latin, create a function. When a word is written in pig Latin, its first character is dropped, shifted to the word's tail, and the letters "ay" are added. For instance, "hello world" would be "ellohay orldway" in pig Latin. Your function can be written to presume that each word has at least two letters, that there is one space between each word, and that there are no punctuation marks.
- Write a function that takes a gross salary and calculates the net salary by deducting: • 7.65% for FICA • x for federal taxes • y for state taxes • z for local taxes Also, deduct $75 for parking fees and $22.50 for a gym membership. The federal tax rate must be between 10 and 37 percent. The state tax rate must be between 3.25 and 11.33 percent. The local tax rate may not be greater than 3%. If any of those values are outside the valid range, return INVALID_PERCENTAGE from your function. Federal, state, local taxes, and gym membership amounts should be passed in by value. FICA and parking should be a global constant. COMPUTER LANGUAGE IN CTo translate a sentence into pig Latin, create a function. When a word is written in pig Latin, its first character is dropped, shifted to the word's tail, and the letters "ay" are added. For instance, "hello world" would be "ellohay orldway" in pig Latin. Your function can be written to assume that each word has at least two characters, is separated by a space, and is free of punctuation.3. If you've ever visited Europe (or Canada) you'll know that they tend to measuretemperature in degree Celsius rather than Fahrenheit. Conversion is pretty simple: if f isthe temperature in degree Fahrenheit, then the temperature in degree Celsius isc = (f-32)*5/9.a. Write a function convert() that takes as an input degree Fahrenheit andreturns degree Celsius.>>> convert(32)0.0>>> convert(68)20.0b. Using your function from part a. write a function table() that prints aformatted look-up table that helps your European and Canadian friends figure outthe temperature in Chicago.>>> table()F C-22.0 -30.0-4.0 -20.014.0 -10.032.0 0.050.0 10.068.0 20.086.0 30.0104.0 40.0This question is about the formatting: make sure the temperatures are displayedwith the same precision as shown above and aligned as above.