Suppose you have written the following function. function salesTax(price, rate) { let tax = price * rate; return tax; { How can you call the function, passing in values of 9% for the sales tax rate and $20 for the price? a. salesTax(20, 0.09); b. salesTax(0.09, 20); c. function salesTax(20, 0.09); d. tax = 20 * 0.09;
Q: Choose one of the following themes and investigate it for your peers. A funnel chart plots data…
A: Start: Step 1: double-check the information sample. check the information before sampling Step 2:…
Q: Given the following Snort rule alert tcp $EXTERNAL_NET any -> $HOME_NET any (msg:"SCAN SYN…
A: According to the data provided: We need to rewrite the rule for packets originating from the…
Q: computer science - Discuss TWO (2) benefits of an ERP system.
A: Introduction: Business people refer to ERP systems as Enterprise Resource Planning systems (ERPs).
Q: select T.branch-name from branch T, branch S where T.assets > S.assets and S.branch-city =…
A: Relational Algebra in DBMS As the word suggest 'relational' which comes from relation and 'algebra'…
Q: ion does today's knowledge of the impor
A: Introduction: Below the function does today's knowledge of the importance of data privacy play
Q: Distinguish between a microprocessor and a microcontroller.
A:
Q: What does "privacy" imply in the context of computer security? Is the sense of privacy shared by…
A: What does "privacy" imply in the context of computer security In information technology, delivering…
Q: Fhjygghh
A: Concatenation means when 2 strings are joined.
Q: How long has C++ been around, and what are some of its key features?
A: C++: Many programmers consider C++ to be the greatest OOP language for building large-scale systems.…
Q: Computer science What methods may be utilised to secure IIS? What are some examples of automated…
A: Introduction: Internet Information Services (IIS) is an abbreviation for Internet Information…
Q: What text features may a reader utilise to preview a document?
A: Introduction: Prepare yourself BEFORE reading any tough content. Spending a few minutes preparing…
Q: What is the difference between a subsystem and a logical division, and why is it important?
A: Difference between subsystem and logical division. In computing, a subsystem is a single established…
Q: Why do we need big data in manufacturing and technology development? Computer science
A: The manufacturing industry is currently in the midst of a data-driven change, which promises to…
Q: What role does ethics play in information technology?
A: Introduction: What role does ethics play in information technology?
Q: you are a network tester and your boss says, "Integrity testing is pointless. Integration testing is…
A: NOTE :- Below i explain the answer in my own words by which you understand it well. I reject…
Q: 10.3 (THE MYINTEGER CLASS) Design a class named MyInteger. The class contains: · An int data field…
A: Your java program is given below as you required with an output.
Q: So, what exactly are the parts of a computer?
A: Computer Components Information Unit: A PC may respond to a command from a device. For this, use the…
Q: Indicate the run time complexity: for (int i = 0; i < 8n; i=i+2) k++; O O(n) O 0(4n) O O(8n) O O(n…
A:
Q: In a few words, describe two key developments in computer history.
A: First Mouse The mouse idea was conceived in 1941, but the first officially reported mouse did not…
Q: Explain why a manager, such as Satoshi, should issue an authorization via the management role rather…
A: Given: Authorizations are given to roles in SQL. Consider an employee database in which a manager…
Q: Distinguish between a hash and a MAC algorithm. Show how they may be used to verify communications.…
A: Given: Understand the difference between hash and MAC. Show how they may be used for message…
Q: What are the advantages and disadvantages of storing data on the cloud? Companies who provide…
A: Intro According to the question, cloud storage is always used to store the data to save for the…
Q: [Information Technology] What does resource management entail?
A: Introduction: Currently an established industry standard that is growing at an incredibly quick…
Q: Problems with cloud-based storage solutions.
A: Introduction: Confidentiality of information Your information is solely your responsibility. You…
Q: Integrity testing is a waste of time, according to your supervisor. Not necessary if each app is…
A: Integrity: Integrity tests are a sort of personality test that is used to determine whether or not a…
Q: computer c
A: Crime is only software utilized by digital crooks to do this criminal operations Crime is any PC…
Q: Why should general-purpose programs not be written in assembly language? In what circumstances do…
A: Assembly language is not used in the creation of general purpose applications because of the…
Q: a) Create an annotated parse tree for the strings: 0101000 b) What is the result of S.value?
A:
Q: Defir
A: Givem: A collection of restrictions called integrity constraints. It is used to save information of…
Q: What is the output result and explain the process as well please
A: In this question, we are are given a code segment and we are asked to answer the output Given:
Q: Is the (RIA) project a failure in your opinion? Please explain why you came to your conclusions.
A: According to me, I consider the (RIA) project to be a failure as: When citizens are able to satisfy…
Q: Can someone explain how the output of this recusrsive function is 5? I find recursion difficult to…
A: Here when values of n becomes 0, it return value 20. Orelse the value will call itself ie recursion…
Q: How to upload live html website using infinity?
A: Infinity: Infinity is the platform which provides the server to host the application online. It…
Q: PYTHON! Can someone help me with this problem in python? I want the output to be stored in a new…
A: The Python code is given below with screenshots
Q: Describe the steps required in transforming a high-level language programme, such as C, into a…
A: Introduction: A high-level programming language provides a high degree of abstraction from the…
Q: Distinguish between C++ and Java
A: Intro C++ It is a programming language that includes the function of C programming language in…
Q: What are the different parts of a typical Web application?
A: Introduction: The various components of a typical Web application are as follows : Client-Side…
Q: Computer Science 8. For selected non-schedulable set of tasks draw in one graph, processor demand…
A: In the schedule analysis , if the task set is schedulable, the algorithm is guaranteed to return the…
Q: What methods of usability testing, such as cognitive walkthrough, may be used to assess the online…
A: Introduction: Candidate Usability Analysis Methods, Candidate Usability Analysis Methods will…
Q: What exactly is a collection (also known as a container instance)?
A: Introduction: A group of things or a container Instances are groupings of components or objects that…
Q: Integrity testing is a waste of time, according to your supervisor. Not necessary if each app is…
A: Integrity testing is not a waste of time, but one of the vital step in producing a software…
Q: What exactly is an auto keyword in C?
A: Intro In the C programming language, Auto is a storage class/keyword that is used to declare a local…
Q: Explain the internet notion using the following important concepts: (a) background of the internet…
A: Introduction: The Internet can be defined as the connecting of numerous computer networks with one…
Q: If you write the JavaScript code specialInstructions:in front of a series of statements, you create…
A: Find the required answer with explanation given as below :
Q: Is it possible to describe the mechanisms for dealing with interruptions, as well as their…
A: Interruptions increase the power consumption by an average of 5%. In addition, interruptions impact…
Q: What is the significance of the difference between changeable and immutable values in the…
A: Intro The creation of a mutable object differs from that of an immutable object in that it can be…
Q: What is the significance of cypher in the context of communication security protocols?
A: Introduction: Cipher is a type of cryptographic algorithm that is often used in cryptology (the…
Q: Computer science What sorts of risks should be addressed in resilience planning?
A: Introduction: Planning for Resilience: Resiliency Planning refers to the entire range of…
Q: The ______ broad category of BI/analytics includes genetic algorithms and linear programming.
A: Introduction: There are numerous elements that are shared by all optimization models:
Q: If you're a Toyota analyst, compose a quick SWOT analysis including probable strengths, weaknesses,…
A: If you're a Toyota analyst, make a list of SWOT analyses highlighting possible strengths,…
Suppose you have written the following function.
function salesTax(price, rate) {
let tax = price * rate;
return tax;
{
How can you call the function, passing in values of 9% for the sales tax rate and $20 for the price?
a.
salesTax(20, 0.09);
b.
salesTax(0.09, 20);
c.
function salesTax(20, 0.09);
d.
tax = 20 * 0.09;
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Suppose you have two function definitions with the following declarations:double score(double time, double distance);int score(double points);Which function definition would be used in the following function call and why would it be the oneused?double x = 1.0;x = score(x, 2*x);Consider the following function call: draw_circle('red', 3) What is the function name and what is the first argument passed to the function? a. The function name is draw_circle and the first argument is 3. b. You need to see the function definition to determine the function name and arguments. c. The function name is draw_circle, but you need to see the function definition to determine the arguments. d. The function name is draw_circle and the first argument is 'red'. e. The first argument is 'red', but you need to see the function definition to determine the function name.Engineers often measure the ratio of two power measurements in decibels, or dB, which can be calculated as follows:dB= log10P2/P1Where P2 is the power level being measured, and P1 is some reference power level. Write a function that calculates the level. The function’s prototype is as follows:double dBCalculator (double P1, double P2);Then, call dBCalculator from the main function to find the power ratio for the measurements from 1 to 20 Watts, in 2 Watt steps. You can assume that the reference power P1 is 1 Watt.
- Mark the following statements as true or false: a. To use a predefined function in a program, you need to know only the name of the function and how to use it. (1) b. A value-returning function returns only one value. (2, 3) c. Parameters allow you to use different values each time the function is called. (2, 7, 9) d. When a return statement executes in a user-defined function, the function immediately exits. (3, 4) e. A value-returning function returns only integer values. (4) f. A variable name cannot be passed to a value parameter. (3, 6) g. If a C++ function does not use parameters, parentheses around the empty parameter list are still required. (2, 3, 6) h. In C + + , the names of the corresponding formal and actual parameters must be the same. (3, 4, 6) i. A function that changes the value of a reference parameter also changes the value of the actual parameter. (7) j. Whenever the value of a reference parameter changes, the value of the actual parameter changes. (7) k. In C++, function definitions can be nested; that is, the definition of one function can be enclosed in the body of another function. (9) l. Using global variables in a program is a better programming style than using local variables, because extra variables can be avoided. (10) m. In a program, global constants are as dangerous as global variables. (10) n. The memory for a static variable remains allocated between function calls. (11)(Practice) For the following function headers, determine the number, type, and order (sequence) of values that should be passed to the function when it’s called and the data type of the value the function returns: a. int factorial(int n) b. double volts(int res, double induct, double cap) c. double power(int type, double induct, double cap) d. char flag(char type, float current, float time) e. int total(float amount, float rate) f. float roi(int a, int b, char c, char d, float e, float f) g. void getVal(int item, int iter, char decflag, char delim)def truth_value(integer): """Convert an integer into a truth value.""" # Convert 0 into False and all other integers, # including 1, into True if integer == 0: truth_value = False else: truth_value = True return truth_value Now, write a function that goes in the opposite direction of the truth_value() function. This new function should convert a truth value into an integer. In particular, True should be converted into 1 and False into 0. Name the new function integer_0_or_1(). All you need to include below is your definition of the function integer_0_or_1(). It will be tested automatically against relevant inputs. So include your function and nothing more.
- 1. Write a program in python that contains a main function and a custom, void function named show_larger that takes two random integers as parameters. This function should display which integer is larger and by how much. The difference must be expressed as a positive number if the random integers differ. If the random integers are the same, show_larger should handle that, too. See example outputs. In the main function, generate two random integers both in the range from 1 to 5 inclusive, and call show_larger with the integers as arguments.EXAMPLE OUTPUT 13 is larger than 1 by 2EXAMPLE OUTPUT 2The integers are equal, both are 31. Write a function which takes one parameter int num, and prints out a countdown timer with minutes and seconds separated by a colon (:). It should print out one line for each second elapsed and then pause one second before printing out the next line. A few things to note: - You can assume that calling the function usleep(1000000) makes the program pause for one second - It should count down from num minutes:zero seconds to zero minutes:zero seconds - Your function must have the following signature: void timer(int num) You do not need to demonstrate calling this function from main(). You don't need to format the output nicely; the below is acceptable output for calling this function when minutes is 10: 10:0 9:59 9:58 … 9:1 9:0 8:59 8:58 … 0:2 0:1 0:036- Consider the following function call: min(x, y) What is the function name and what is the first argument? a. The function name is min and the first argument is x b. Functions in Python don't have names (they're anonymous functions), but the first argument is x. c. The function name is min, but you need to see the function definition to determine the arguments. d. Functions in Python don't have names (they're anonymous functions) and you need to see the function definition to determine the arguments
- Assume that the declarations for two functions look as follows: int Function1(double x); 2.void Function2(double x); Give some sample code that would show how each function could be used.what is the answers to these 3 questions in C++? 1. Write a function that returns the cost of mailing a package, given the weight of the package in pounds and ounces, and a cost per ounce. Recall that there are 16 ounces in a pound. ("given" means that these values will be passed to the function as parameters) Write the statements to read in the weight of a package (in pounds and ounces), and the cost per ounce for mailing. Then call your function to calculate the mailing cost, and print the mailing cost. 2. Write a function checkeven which receives 3 integer variables and prints YES if all three numbers are even. Otherwise the function prints NO. ("receives" means that these values will be passed to the function as parameters) Write the statements to read in three numbers and call the checkeven function. 3. Write another version of the checkeven function. This version receives 3 integer variables and returns true if all three numbers are even. Otherwise, the function returns false.…(Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7.99 for up to 10 hours of connection time. Additional hours or partial hours are charged at $1.99 each.Write a function charges that computes the total charge for a customer based on the number of hours of connection time used in a month. The function should also calculate the average cost per hour of the time used (rounded to the nearest 0.01), so use two output parameters to send back these results.You should write a second functionround_money that takes a real number as an input argument and returns as the function value the number rounded to two decimal places. Write a main function that takes data from an input file usage.txt and produces an output file charges.txt. The data file format is as follows:Line 1: current month and year as two integersOther lines: customer number (a five-digit number) and number of hours usedHere is a sample data file and the corresponding output file:Data file…