IN JS ONLY NEEDED SOLUTION Create a function that takes an amount of monetary change (e.g. 47 cents) and breaks down the most efficient way that change can be made using USD quarters, dimes, nickels and pennies. Your function should return an object. Coin Value Penny 0.01 Nickel 0.05 Dime 0.10 Quarter 0.25 Examples makeChange (47) makeChange (24) makeChange (92) S| { "q": 1, "d": 2, "n": 0, "p": 2 } { "q": 0, "d": 2, "n": 0, "p": 4 } { "q": 3, "d": 1, "n": 1, "p": 2 }
Q: The part of a program that uses a function is called thea) user b) caller c) callee d) statement
A: Function is block of statements to perform a particular task which can be used by simply calling it…
Q: Which of the following is the same ass [0 : -1] ?a) s [-1] b) s [ :] c) s [ : len(s) -1] d) s [O :…
A: Lets see the solution.
Q: Q: One of the modern devices that have (silently) crept into distributed tems are GPS receivers.…
A: The answer to the question is given below:
Q: How can the blocks get identified in the blockchain and how to modify the data in the blocks? What…
A: Blockchain consists of different blocks. The data is permanently stored in the blocks after filling…
Q: What is the first and last address in this block? 200.107.16.17/18
A: 200.107.16.17/18 in the given address: /18 means 18 : network bits in the address and 32-18 = 14…
Q: Orthogonality refers to the presence of a "backup" instruction in an instruction set design that may…
A: The CPU requires the following to function:The programme is run using the code. the reference point…
Q: What impact has the internet had on the development of different kinds of systems?
A: The Internet has turned our existence upside down. It has revolutionized communications, to the…
Q: There is an N of components, represented by the strings S1,S2, .... SN into the kitchen. The chef…
A: Input-Output Format: The first line of the input contains a single integer T denoting the number of…
Q: es to VeraCrypt and write a paragraph summarizing your results. In a second paragraph make a…
A: Introduction: The process of encoding data is referred to as encryption. This means that…
Q: What difficulties exist while working with massive datasets?
A: Introduction Big data is a method of gathering, storing, and analyzing large datasets, as well as…
Q: Do Windows machines have any potential entry points for investigators?
A: Introduction: Forensics performed on laptops collects two distinct types of data:information that is…
Q: Think about what goes into your back-up strategy and how you may improve it. Just what makes a…
A: The data in a working system may get damaged or lost over time. Important data should constantly be…
Q: If malicious traffic is redirected from one VLAN to another, it might potentially compromise the…
A: In the early stages of an assault, a nation-state finds its goal. Examining pertinent people and…
Q: A multiprocessor with eight processors has 20 attached tape drives. There is a large number of jobs…
A: operating system An operating system goes about as a go-between between the user of a PC and PC…
Q: What are the main advantages and disadvantages of cloud storage
A: Cloud computing architecture is the foundation of cloud-based data storage, which is essentially a…
Q: Explain SATA hard disk.
A: Introduced in 2003, SATA (or Serial Advanced Technology Attachment) is the standard interface for…
Q: Create a list of the top five sectors or fields associated with internet governance and provide…
A: Internet governance is 'the turn of events and application by states, the confidential area, and…
Q: Discuss OS security threats, at least 4 threats.
A: Threats When someone makes a threat to murder or hurt another person, it is considered a criminal…
Q: Using SQL data definition language, write the SQL statements to create each of the following…
A: The SQL statements to create each of the following relations.
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: Consider an environment in which there is a one-to-one mapping between user-level threads and…
A:
Q: i = 2 while i < 24: j = 4 while j <= 10: print(f'{i}{j}') j = j + 3 i = i + 13…
A: The answer is solved using Python Programming language:
Q: There is an N of components, represented by the strings S1,S2, .... SN into the kitchen. The chef…
A: Algorithm: Start Read no.of test cases t Iterate through the loop t times Read n value Declare an…
Q: 2. Reading Files Create a class with a method that, given a string representing a file name,…
A: *As per the guideline I can only provide the solution for 1 question so adding the solution for the…
Q: Is it conceivable for the data breach to have a major impact on cloud security? Why should I be…
A: It certainly has an effect.Due to a data leak, an unauthorised individual has access to sensitive,…
Q: How do you create a variable with the floating number 2.8? O a. float x 2.8f O b. byte x 2.8f; Oc. x…
A:
Q: Q: One of the modern devices that have (silently) crept into distributed tems are GPS receivers.…
A: give examples of distributed applications that make use of GPS information.
Q: Q: One of the modern devices that have (silently) crept into distributed tems are GPS receivers.…
A:
Q: When compared to other branches of computer science, how does programming stand out? What criteria…
A: In basic terms, computer programming is inseparable from coding. As per a few evaluations, there are…
Q: How do the most vital parts of Phases of Compiler operate, and what are they? Each step of this…
A: Your answer is given below. Introduction :- Phases are the steps in the compilation process, whereas…
Q: When weighed against one another, what are the main upsides and downsides of cloud storage
A: Introduction: Users now have the option to exchange and access files remotely without having to use…
Q: Why should one use Java's Collection Framework, and what benefits does it provide?
A: Framework for collecting data: The implementation of generally reusable collection data structures…
Q: Several factors need to be considered in tandem to produce a compiler that is both fast and precise.…
A: Here tandem means one after other. Compiler is used to translate high level language into machine…
Q: Implement the one-time pad encryption scheme in Microsoft Excel. Your worksheet should look as…
A: The answer is written in step 2
Q: Explain how this would work.
A: The Diffie-Hellman key-exchange protocol is vulnerable to a man-in-the-middle attack by a malicious…
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: Does it make sense to restrict the lifetime of a session key? If so, give an example how that could…
A: The answer to the question is given below:
Q: How may of each type of subnet size did you need? include the unallocated subnet si
A: Here is the solution:
Q: The two variables a and b have initial values of 1 and 2, respectively. The following code is for a…
A: Introduction: Linux is an operating system available for free on the internet. In this question we…
Q: a. Find the subnet mask b. How many valid hosts are created? c. Find the first and last host address…
A: The answer is
Q: What are the many factors that must be considered while designing a compiler that generates reliable…
A: Introduction: An grasp of the target machine's runtime environment and instruction set is essential…
Q: C has a construction called a union, in which a field of a record (called a struct in C) can hold…
A: Answer : Union: Union is a user defined data type which is a collection of different variables of…
Q: When it comes to cloud computing, what are the ultimate repercussions of a data breach? In what ways…
A: Justification: Depending on the data, the ramifications might include database corruption,…
Q: How can database technology aid in the management of data as a corporate resource in a business?
A: The solution to the given question is: Data management refers to the organization, storage and…
Q: Explain the internet-related difficulties that arise within the context of each of the five main…
A: Organizations nowadays are reliant on a number of regulations controlling the protection of…
Q: Users need to be informed on how to protect themselves against session hijacking attempts. Think…
A: Session hijacking: As it sounds. An attacker may hijack a user's session, stealing their personal…
Q: This article provides both an introduction to and a summary of the IOT temperature monitoring…
A: The Internet of Things is used to link electrical devices to the internet. The devices might include…
Q: How different are conventional computers from quantum ones? What challenges must be overcome before…
A: Statement: A quantum information processing system is a quantum computer. It is a kind of computer…
Q: Assume that the address of myStr is OXOFF00 myStr: string "ABCD"
A: The answer is
Q: What are Set Associative Caches ?
A: In cache memory there are three types of mapping techniques that are: Direct cache Associative…
Step by step
Solved in 2 steps with 1 images
- IN JS ONLY NEEDED SOLUTION Create a function that takes an amount of monetary change (e.g. 47 cents) and breaks down the most efficient way that change can be made using USD quarters, dimes, nickels and pennies. Your function should return an object. Coin Value Penny 0.01 Nickel 0.05 Dime 0.10 Quarter 0.25 Examples makeChange (47) → { "q": 1, "d": 2, "n": 0, "p": 2 } makeChange (24) → { "q": 0, "d": 2, "n": 0, "p":4} makeChange (92) { "q": 3, "d": 1, "n": 1, "p": 2 } SUsing c++ In main.cpp, complete the function RollSpecificNumber() that takes in three parameters: a GVDie object, an integer representing a desired face number of a die, and an integer representing the goal amount of times to roll the desired face number. The function RollSpecificNumber() then rolls the die until the desired face number is rolled the goal amount of times and returns the number of rolls required. Note: For testing purposes, the GVDie objects are created in the main() function using a pseudo-random number generator with a fixed seed value. The program used during development uses a seed value of 15, but when submitted, different seed values will be used for each test case. Refer to the textbook section on random numbers to learn more about pseudo-random numbers. Ex: If the GVDie objects are created with a seed value of 15 and the input of the program is: 3 20 the output is: It took 140 rolls to get a "3" 20 times. #include <iostream>#include "GVDie.h"using…Create a program that accepts an integer N, and pass it to the function generatePattern. generatePattern() function which has the following description: Return type - void Parameter - integer n This function prints a right triangular pattern of letter 'T' based on the value of n. The top of the triangle starts with 1 and increments by one down on the next line until the integer n. For each row of in printing the right triangle, print "T" for n times. In the main function, call the generatePattern() function. Input 1. One line containing an integer Output Enter N: 4 T TT TTT TTTT
- In C++, define a “Conflict” function that accepts an array of Course object pointers. It will return two numbers:- the count of courses with conflicting days. If there is more than one course scheduled in the same day, it is considered a conflict. It will return if there is no conflict.- which day of the week has the most conflict. It will return 0 if there is none. Show how this function is being called and returning proper values. you may want to define a local integer array containing the count for each day of the week with the initial value of 0.Whenever you have a Course object with a specific day, you can increment that count for that corresponding index in the schedule array.Using c++ Rolling for a pair Given two GVDie objects that represent 2 six-sided dice and an integer that represents a desired value as parameters, complete the function RollingForPair() in the main class. The main class rolls the dice until a pair with the desired value is rolled. The function RollingForPair() then returns the number of rolls thrown to achieve the result. Assume the desired value received from input is within the appropriate range, 1-6. Note: For testing purposes, the GVDie objects are created in the main() function using a pseudo-random number generator with a fixed seed value. The program uses a seed value of 15 during development, but when submitted, a different seed value will be used for each test case. Refer to the textbook section on random numbers to learn more about pseudo-random numbers. Ex: If the GVDie objects are created with a seed value of 15 and the input of the program is: 2 the output is: It took 82 rolls to get a pair of 2's. #include…Define an enumeration type triangleType that has the values scalene, isosceles, equilateral, and noTriangle. Write a function triangleShape that takes as parameters three numbers, each of which represents the length of a side of the triangle. The function should return the shape of the triangle. (Note: In a triangle, the sum of the lengths of any two sides is greater than the length of the third side.) Write a program that prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle
- For all WWPD questions, type Function if you believe the answer is , Error if it errors, and Nothing if nothing is displayed. As a reminder, the following two lines of code will not display anything in the Python interpreter when executed: >>> x = None >>> X >>> lambda x: x #A lambda expression with one parameter x >>> a = lambda x: x # Assigning the lambda function to the name a >>> a (5) >>> (lambda: 3) () # Using a lambda expression as an operator in a call exp. >>> b = lambda x: lambda: x # Lambdas can return other lambdas! >>> c= b (88) >>> C >>> c() >>> d= Lambda f: f(4) # They can have functions as arguments as well. >>> def square(x): return x * X >>> d (square) >>> Z = 3 >>> e = Lambda x: lambda y: lambda: x >>>e (0) (1) () >>> f = Lambda z: x + Z >>> f (3) >>> higher_order_lambda = Lambda f: Lambda x: f(x) >>> g = Lambda x: x* x >>> higher_order_lambda (2) (g) # Which argument belongs to which function call? >>> higher_order_lambda (g) (2) + Z >>> call_thrice = lambda f:…Define an enumeration type, triangleType, that has the values scalene, isosceles, equilateraland noTriangle. Write a function triangleShape that takes as parameters three numbers, each of which represents the length of a side of the triangle. The function should return the shape of the triangle. (Note, ina triangle, the sum of the lengths of any two sides is greater than the length of the third side). Write a program that prompts the user to input the length of the sides of a triangle and outputs the shape of the triangle. The user can enter the sides in no particular order. C++Write in C++ Alice is trying to monitor how much time she spends studying per week. She going through her logs, and wants to figure out which week she studied the least, her total time spent studying, and her average time spent studying per week. To help Alice work towards this goal, write three functions: min(), total(), and average(). All three functions take two parameters: an array of doubles and the number of elements in the array. Then, they make the following computations: min() - returns the minimum value in the array sum() - returns the sum of all the values in the array average() - returns the average of all the values in the array You may assume that the array will be non-empty. Function specifications: Function 1: Finding the minimum hours studied Name: min() Parameters (Your function should accept these parameters IN THIS ORDER): arr double: The input array containing Alice's study hours per week arr_size int: The number of elements stored in the array Return Value:…
- In JAVA A function foo takes three integers as input arguments, i.e., foo(int a, int b, int c). The three inputs represent the three sides of a triangle in centimeter. The function is expected to return the type of a triangle: “equilateral”, “isosceles”, or “scalene”. Assume the domains of the three variables are 1 ≤ a ≤ 100, 50 ≤ b ≤ 150 and 100 ≤ c ≤ 200, respectively. A test case is in a tuple format <a, b, c, expected_output> with test inputs and the expected output. S1 is a set of test cases for the “Boundary Value Analysis” approach. S1 = S2 is a set of test cases for the “Robustness testing” approach. S2 – S1 = S3 is a set of tests cases for the “Robust Worst-Case testing” approach. Are there any types of triangles that S3 cannot reveal? If yes, what are they? If no, why?IN C++ USING CLASS Write a program in C++ that implements the game tic-tac-toe: Tic-Tac-Toe is a game played on a three-by-three board. Two players, X and O, alternate in placing their respective marks in the cells of this board, starting with player X. If either player succeeds in getting three of his or her marks in a row, column, or diagonal, then that player wins. In this homework, you should use the OOP concepts to implement the tic-tac-toe gamethello is a board game and you are expected to implement the move function for this game. Arguments passed to the function are - a symbol of the player making the move and x y coordinates of the cell at which the player wishes to make the move. The move function will be returning a boolean, false - if the move isn't feasible and true - if the move is feasible and this function will also make the move then i.e. make the required changes in the board. Input Format: Line 1: Integer n (Total number of moves) Line 2: Player 1 coordinates, x and y (Two integers separated by space) Line 3: Player 2 coordinates, x and y (Two integers separated by space) Note 1: Number of moves (i.e. n) is always even and Player 1 always starts the game. Note 2: If any player's coordinates are not valid, enter again till the right move. Main function is given for you reference. Sample Input: 2 24 15 25 Sample Output: 00000000 00000000 00001000 00011000 00021000 00000000 00000000 00000000 false 00000000 00000000…