Assume the following function has been implemented. def descript(num: int)-> str: """Return "High" if num is greater than 100, return "Low" if num is between 0 and 100 inclusive, and return "Neg" otherwise || || || Also assume that the implementation has been tested on the inputs: 500, 100, 0, -1, -50. Which of the following inputs would be the least redundant for testing purposes. A. 0 B. 50 101 1 D. 1000000000 E. They are all equally redundant.
Q: The number of available processors, both specialized and general-purpose, may be gleaned from the…
A: A computer's CPU processes and reacts to basic instructions. Processors fetch, execute, encode, and…
Q: End-to-end testing needs to have a clear justification and necessity.
A: the process of assessing a system (or technology) to see if it fulfils the goals it was intended to…
Q: Define information security governance and list five overarching principles that must be met for it…
A: Five stages in computer forensics: As law enforcement and prisons recognise the usefulness of IT…
Q: In the context of computers, what is the difference between "architecture" and "organisation"?
A: Computer organisation is defined as the planning and management of the computer framework, whilst…
Q: When creating a database, here are the general steps that I follow: (a) determine the purpose of the…
A: Please find the answer below :
Q: To the point, what exactly is "File-System Mounting"? Can you explain the Mounting differences…
A: Advantages of using thin customersThin clients of various enterprises and their IT infrastructure…
Q: Examine the two most prominent advantages of cloud computing and compare and contrast them.…
A: Introduction: A scalable online environment provided by cloud computing makes it possible to manage…
Q: (python) calculating time in Bubble Sort the funtion will only run for 40 seconds create a list…
A: create a list that stats with 5 and will be adding 5 each time, 5+5+5+5+...... until the program…
Q: What does it mean for a central processing unit to have several cores? How does it improve upon the…
A: Introduction: A processor that is composed of more than one core logic is referred to as a…
Q: When does a system reach a stalemate and what causes it?
A: Deadlock: When two processes that share a resource are effectively blocking each other from…
Q: the probability that you are infected if a 95% accurate test returns a positive result
A:
Q: c program, Create a structure called car with the following members: • Make • Model • Year •…
A: Introduction: One of the five data types in programming is structure. A structure is used to express…
Q: While not a technical requirement, a valid license is legally, ethically, and morally required for…
A: Virtual machine are the simulation of computers which will try to perform like a computers which…
Q: Explain how TLBs improve paging efficiency in (a)(i) and (a)(ii) below.
A: introduction: TLBs increase paging efficiency. Visual cache viewer (TLB) is a memory archive that…
Q: What's the difference between having "many threads" and having "many processes" operating at the…
A: The phrase "many processes" as opposed to "many threads" is used to describe what?Please provide a…
Q: Can you give me a high-level summary of the compiler and elaborate on why testability is so crucial?
A: Examinability Tips: This brings us to the end of the testability tip. Use nonverbal communication…
Q: 5. Write a program that allows the user to populate a two-dimensional array of arbitrary size M by…
A: Algorithm for the code: 1. Start 2. Initialize two variables M and N to store the size of a…
Q: Programming Exercises 1. Name and Address Write a GUI program that displays your name and address…
A: Algorithm: 1. Start 2. Create a class ‘myWindow’ which extends Frame. 3. Create a constructor _init_…
Q: Tell me about your experience using email. How many clicks do I need to do before my email is sent…
A: Introduction: This definition states that a mental model is an intuitive perception that a user has…
Q: You may be wondering, "Why bother with a technical analysis?" Explain how it is used, why it is…
A: Introduction: Techniques include technical analysis. Techniques for Valuation When evaluating a…
Q: 1- Represent the following complex numbers in polar coordinate Z= 2 + 5j Y=-3-3j D= -2 +6j
A: Introduction The location of a point or any other geometric element is determined by a coordinate…
Q: Write a C program that uses a structure array to hold contact information for your friends. The…
A: ALGORITHM Step 1: Start Step 2: Constructing a struct 'phonebook' with 5 records. Step 3: Each…
Q: Can we safely assume that reusable has reached a stalemate?
A: Because the operating system must deal with an unknowable and arbitrary collection of user…
Q: Write a program that add five numbers at memory locations beginning at $2000 with number=8-bits and…
A: Here is the assembly code to add five numbers:
Q: This session will provide you an overview of the compiler and go through the testability tip.
A: Introduction: Testability is the ability to test a hypothesis or idea. Testability includes both…
Q: 1) Visit any website, and with Wireshark, provide the exact/actual sequence and acknowledgement…
A: Disclaimer: “Since you have asked multiple question, we will solve the first question for you. If…
Q: Should we eliminate or drastically reduce the analysis phase when we plan to use a software package…
A: Even if it isn't perfect, the analysis phase is still highly important. The design strategy that was…
Q: 1. Write a program that asks the user to input a number (n) and display the sum of first n integers…
A: Algorithm for the code: 1. Start 2. Declare integer variables n, count, sum, and assign sum = 0. 3.…
Q: Write a shell script that displays “sammy”,”bonny”,”cj”,”poppy”,”drake”,and “lenny” on the screen…
A: Here I have created a file and added the names to the file. Next, I have printed the content of the…
Q: Specify the structural components of a program that could pass automotive safety inspections.
A: Introduction: Describe the layout of an application that complies with requirements for vehicle…
Q: At the same time as you're developing the framework, you should be identifying and assessing the…
A: When it comes to the design of an information system, there are a few challenges that need to be…
Q: Don't just argue that deep access is preferable because it's faster; provide some concrete reasons…
A: Only when a procedure can be sent as an argument to a function does deep/shallow binding make sense.…
Q: I was wondering, what are the negative aspects of business networking? In addition to describing the…
A: If company-wide networking is unavailable, servers, applications, and devices cannot connect.…
Q: Compute the standard deviation by using the following equations then compare the result with that…
A: Code(Explained with comment) x = rand(1,200); % create random array n = length(x); % get length…
Q: Is there an alternative to constructing your own data center and filling it with Windows or Linux…
A: In-house data centres store a company's servers. The company's headquarters office has networking…
Q: If you want to convince a programmer that deep access is preferable to shallow access, you need to…
A: Introduction: Dynamic scope allocation rules are used for non-block structured languages. By taking…
Q: Anyone have experience with using Basemap in the THONNY editor? I cannot get my from…
A: There is an interpreter that comes with Thonny himself. It runs as part of the Thonny environment,…
Q: • Create a JavaFX application that displays the following window: ~ 3 4 5 Array And shows the array…
A: This is the JavaFX programming. Apply the title name is Array. Here creates one button. Apply the…
Q: Which of the statements below is correct? a. Non-Oracle RDBMS use tablespaces as storage…
A: Correct Option: In Oracle, users who access the Database can all achieve the same results.
Q: eneralization, overfitting, ar
A: Underfitting is defined as when the training error is high. Underfitting comes under a model that…
Q: What does it mean when an OS user says their hard drives use a "RAID structure"? Which RAID…
A: RAID structure is a way of storing data in operating system.
Q: If you want to argue that deep access is better than shallow access, you need to do more than simply…
A: Introduction: The use of deep learning in neuroimaging data is especially intriguing since MRI scans…
Q: How do you keep track of employee productivity?
A: An employer pays an employee to work. Employees need only be paid by an employer to be considered…
Q: Why not try out Sun Solaris's user and kernel threading? Can you explain the pros and cons of…
A: Explanation: Solar micro systems produced the Unix-based Sun Solaris os. Fibers are lightweight…
Q: In what precise sense can we define the term "storage area network system"?
A: Storage area network (SAN) is a quick system of switches and capacity devices connected to PC…
Q: What are the benefits of using an OS, and how do they function? In a single paragraph, the batch OS…
A: When it comes to computer software, the operating system takes the cake. The hardware and software…
Q: Various Abstract Data Types (ADTS): Select all of the following statements that are true. The ADTS…
A: In Abstract Data Types, the following statements are true: 1) When one has an implementation of…
Q: When do you think it's best to keep everything on-premises, and when do you think it's better to…
A: Dear Student, The answer to your question is given below -
Q: Why not try out Sun Solaris's user and kernel threading? Can you explain the pros and cons of…
A: Introduction: Solar micro systems created Unix-based Sun Solaris OS. Fibers are lightweight…
Q: Compute the standard deviation by using the following equations then compare the result with that…
A: Code(Explained with comment) x = rand(1,200); % create random array n = length(x); % get length…
Can someone help me to explain this? This is a pastime question. The answer is (C), which is 101, but I don't understand why.
Question:
Assume the following function has been implemented.
def descript(num: int)-> str:
"""Return "High" if num is greater than 100, return "Low" if num
is between 0 and 100 inclusive, and return "Neg" otherwise
"""
Also assume that the implementation has been tested on the inputs: 500, 100, 0, -1, -50. Which of the
following inputs would be the least redundant for testing purposes.
A. 0
B. 50
C. 101
D. 1000000000
E. They are all equally redundant.
Step by step
Solved in 2 steps with 1 images
- "use strict"; /* Question 04 Write a function which creates and returns a promise. Its job will be similar to that of Question 01:> Run a given (callback) function after a delay. However:- if the given callback returns a falsy value, the promise should fail (reject)the string "Falsy value retrieved" should be sent through to the reject function- if the given callback returns a truthy value, the promise should pass (resolve)the return value of the executed callback should be sent through to the resolve function */ const doShortlyExpectingTruthy = function(callback, delay, data) {// IMPLEMENT ME}; // Don't change below:module.exports = { doShortlyExpectingTruthy };please use these above function and solve this please....dont copy paste to another website1-The function sum_n_avg computes the sum and the average of three input arguments and relays its results through two output parameters.a)Write a prototype for a function sum_n_avg that accepts three double-type input parameters and returns two output parameters through reference.b)Write the function definition for function sum_n_avg. The function definition is where the actual computations are performed.c)Write a function call in main () for sum_n_avg. The function call can look like below:{double one, two, three, sum_of_3, avg_of_3;printf("Enter three numbers> ");scanf("%lf%lf%lf", &one, &two, &three);sum_n_avg(__________________________________);. . .}2- Write a function definition for a function named final_grade that has a typeint input parameter called points and returns through an output parameter gradePtr the appropriate letter grade using a straight scale (90–100 is an A, 80–89 is a B, and so on). Return through a second output parameter (missedPtr) an…‘Write a function get_names(), which prompts the user for a sequence of names, where each name can contain an arbitrary mix of uppercase and lowercaseletters and space characters, until the user enters "exit". The function should then return a list of capitalized names, whith no leading or trailing space, and with‘one space character separating adjacent words, Write a main() function to test the get_names() function. For example: Enter a name (exit to stop): bill clintonEnter a name (exit to stop): john tigER sMith Enter a name (exit to stop): mary beautiful Graceland Enter a name (exit to stop): exit [Bill Clinton’, “John Tiger Smith’, ‘Mary Beautiful Graceland’ ]
- Please fill in the blanks in C. /* This program acts as an auction house. We’ll let the users bet on x number of products. Assume the minimum bid is $100 (their bid must be at least the minimum). */ #include<stdio.h> #include<stdbool.h> #define minBid 100.00 //Putting all function headers to top __1__ __2__ scanProdInfo(); __3__ printProdInfo(__4__ __5__ p); __6__ checkValid(__7__ amt); //Define struct product __8__ __9__ { __10__ ID; __11__ bid_amt; }; int main() { __12__ num_prod; //to save the number of products __13__ total = __14__; //variable for the total printf("Welcome to the Auction House.\n"); printf("Enter number of products you want to bid on: "); scanf("__15__", __16__); //create an array of struct to save all the products __17__ __18__ bidProds[__19__]; /*call the function to get 1 product info and save it to the…ASSIGNMENT Consider the following function. What is the purpose of the function f? Please do explain and describe in details all possible answers for this function given below.int f(int n) {if ((a >= b) && (c < b)) return b; else if (a >= b) return f(a, c, b); else return f(b, a, c);} To find the maximum number between a, b, and c. To find the middle number between a, b, and c. To find the minimum number between a, b, and c. None of the other statements. Suppose the letters a,b,c,d,e,f have probabilities of 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. Which of the following is the Huffman code for the letter a,b,c,d,e,f? Please show how is the Huffman tree, so that you can determine one of the options below. 0, 10, 110, 1110, 11110, 11111 11, 10, 01, 001, 0001, 0000 11, 10, 011, 010, 001, 000 110, 100, 010, 000, 001, 111 An adjacency matrix of a graph is given below: matrix at photoFirst, draw the graph defined by that adjacency matrix, and label the…Let 1 represent true and 0 represent false. The function Conjunction(), whose incomplete code is given below, computes p∧q: def Conjunction(p,q):#FIX ME#return 1else:return 0 What should the line of code which contains the expression #FIX ME# be replaced with in order to complete the code? Question 3 options: if p != q: if p == 0 and q == 0: if p == q: if p == 1 and q == 1:
- /*Exercises: 1. Complete the program below. Sample Run: Hello from main! Hello from the write Message function! Write a custom message: Hello! Hello! Back in main!*/// This program prints a message by calling a function. #include // Required for cin and cout #include // Required for string using namespace std; // Required for not customMessage; // TODO: Call the writeCustomMessage function with the customMessage as a parameter cout << "Back in main!" << endl; return 0; } // The function to write a message void write Message() (cout << "Hello from the write Message function!" << endl; } // The function to write a custom message voidhaving to use std:: // Write a message to the console from a function vold write Message(); void writeCustomMessage(string message); // The main function int main() {cout << "Hello from main!" << endl; // TODO: Call the write Message function string customMessage; cout << "Write a custom message: "; cin >…Define stubs for the functions get_user_num() and compute_avg(). Each stub should print "FIXME: Finish function_name()" followed by a newline, and should return -1. Each stub must also contain the function's parameters.Sample output with two calls to get_user_num() and one call to compute_avg(): FIXME: Finish get_user_num() FIXME: Finish get_user_num() FIXME: Finish compute_avg() Avg: -1 ''' Your solution goes here ''' user_num1 = 0user_num2 = 0avg_result = 0 user_num1 = get_user_num()user_num2 = get_user_num()avg_result = compute_avg(user_num1, user_num2) print('Avg:', avg_result)a) Write a subprogram ISALPHA that checks if a single ASCII character is alphabetic (i.e. between ’A’ and ’Z’ or between ’a’ and ’z’). The char is passed in R0. If the char is alphabetic R0 must be set to 1, to 0 otherwise. b) Write a program that reads a character from the console and prints a message to the console indicating whether the character is alphabetic, using the subprogram from part a.
- 1 - Nuclear Power Plant (python) The nuclear powerplant at Threeyedfish will automatically run a program to print a warning message when the reactor core becomes unstable. The warning message reads: NUCLEAR CORE UNSTABLE!!! Quarantine is in effect. Surrounding hamlets will be evacuated. Anti-radiationsuits and iodine pills are mandatory. Since the message contains crucial information, it should be printed three times. To do this, write a function that prints this message. This function has to be used three times.For this c++ hw 1) Make a function that reads in 2 integers from the user. (call it Get2Ints) 2) Make a function that swaps 2 integers (call it swap) 3) Make a function swapAndMult that takes two ints as parameters, and one more int parameter which will be a multiplier swapAndMult should take the two parameters and multiply them by the multiplier. The parameters should return from the function with new values. swapAndMult should NOT print out the values. 4) Make a function that prints 2 integers. Call it Print2Ints Main function should: a) declare two integers and a multiplier b) read 2 integers from the user (use your function) c) print the values of the integers (use the function) d) swap the integers e) print the values of the integers f) read an additional integer (the multplier) from the user g) print the multiplier from the user (sometimes called 'echoing the input') h) call swapAndMult i) print the values of the integersCorrect and detailed answer Write a function with the following prototype: /* Determine whether arguments can be subtracted without overflow*/ int tsub_ok(int x, int y); This function should return 1 if the computation x-y does not overflow.