Write a function float final_grade (float g1, float g2) that counts the grade g1 of Coursework 1 for 20% and the grade g2 of Coursework 2 for 80% and returns the final grade. All grades are in the range 0-100, and the function should print "ERROR\n" and return -1.0 if any of its arguments is outside this range. Answer: (penalty regime: 10, 20, ... %) 1
Q: The Runs The simulator should take 2 command-line arguments (or write a "simulator-run" function…
A: To accomplish this task, you can write a Python script that simulates the system and generates the…
Q: MGMT Boutique Inc. is a high-end retailer that operates a chain of boutique stores in significant…
A: Creating a high-level "as-is" process diagram depicting the combined sales report compilation before…
Q: Pop Operation on Two Stacks Mack A Consider two stacks, Stack A and Stack B, each implemented using…
A: The last piece added to the stack is the first one withdrawn, according to the Last-In-First-Out…
Q: Write a program that stores the maximum of three values. The values are stored in X19, X20 and X21.…
A: Here is a Python program that finds the maximum of three values and stores the result in another…
Q: Solve this for me
A: The question is asking to fill in the blanks in the sentence about the reasons for doing Internet…
Q: The following database has 5 transactions. Let min_sup = 60% and min_conf = 80%. TID Items_bought…
A: the correct statement is:- C3= {oke) and L3 = [oke]Therefore, the correct statements are:- C₁ = [m,…
Q: Write a function with signature double mean (int n, double *xarr) that takes an array xarr of length…
A: Algorithm:The mean function takes two parameters:int n: the length of the input array xarr.double…
Q: H. W: Find the Nyquist interval and Nyquist rate for the following: i- 2π ii- cos(400лt).cos(200πt)…
A: The minimum rate at which a signal should be sampled accurately and alias-free to reconstruct it…
Q: (d) The pseudocode below outlines a bucket sorting algorithm where all elements of the unsorted…
A: Let's calculate the bucket for each element in A: For A[1] = 0.2, the bucket index is floor(3 * 0.2)…
Q: Please use my syn.sin.m code to answer 4.2.3. Also, please answer the explanation for the last part…
A: Your `syn_sin.m` file looks good for synthesizing a sum of cosine waves. Here's a breakdown of how…
Q: Let L₁ = {aa, bb}, L₂ = {A, a, aa}, L3 = {x | x = {a,b}* ^ |x| ≤ 3} = {A, a, b, aa, ab, ba, bb, aaa,…
A: The question asks us to evaluate the following expression:(L₁ ∩ L₃) L₂where:L₁ = {aa, bb}L₂ = {Λ, α,…
Q: Week 4 Lab assessment task Use the function julia, that you have defined, to produce an image of a…
A: The objective of the question is to generate a Julia set image using a custom seed constant that is…
Q: Write a program in C to assist in circuit calculations (No previous knowledge in circuits is…
A: The objective of the question is to create a C program that assists in circuit calculations. The…
Q: Instructions Task: Exception handling This program will be reused in the next lab. Save it at a safe…
A: In this question we have to write a JAVA Code for the converion of binary to decimal and also…
Q: Discuss four scenarios of getting the output data and the results obtained based on the Turing…
A: As a theoretical foundation for comprehending computation, the Turing model is frequently utilized…
Q: Assume the database system currently contains only one user database, called 'university', in…
A: In the realm of database management systems (DBMS), creating a new database involves defining a…
Q: Given a list of very-substitutes, http://cse2050.drfitz.fit/data/very/very_words.txt, how do I write…
A: In this question we have to write a python code for enhancing vocabulary by replacing common…
Q: 1. ( powepoint) create a prtesentation of five slides and summarize any 5 topicts wehave cover so…
A: The objective of the question is to create a PowerPoint presentation with specific requirements such…
Q: Refer to the Compensation table below. ID Name Salary Bonus 2538 Lisa Ellison 115000 NULL 5348 Sam…
A: In SQL, the MAX() function is an aggregate function used to find the maximum value of a numeric…
Q: My apologies for misunderstanding. Here's the translation: "A function, f:f(x,y)=x2+2y2−12x+xy is…
A: The objective of the question is to create a contour plot of the given function f(x,y) = x^2 + 2y^2…
Q: Visual basic>
A: Public Class Form1 Private Sub btnGenerateArray_Click(sender As Object, e As EventArgs) Handles…
Q: Visual basic>
A: To create a VB program that reads a student's name and 10 grades, calculates the average, and…
Q: vvv question is below question is below question is below question is below question…
A: Local storage refers to the storing of data on the user's device within the user's browser. It is a…
Q: A windows machine was determined to have LM hashes. Can you crack the users passwords?…
A: In the cybersecurity, password hashing plays a critical role in safeguarding sensitive information…
Q: You work for an insurance company. An analyst comes into your office in a panic. They have been…
A: The objective of the question is to explain Bayes' Theorem and its application in risk assessment in…
Q: Select all the correct responses. There is more than one correct response. Which of the following…
A: In software engineering, the process of requirements engineering and design involves the systematic…
Q: Using the following schemaƟc connecƟons write the code such that the circuit meet the following…
A: All the connections and code stimulations are done on tinkercad and are working…
Q: Suppose we have the following pseudocode (i.e. not directly C++ syntax) that executes in the same…
A: A program is a collection of instructions that informs a computer what to do and how to do it,…
Q: How does a Python function that returns values to the main program differ from a Python function…
A: The main difference between a Python function that returns values and one that does not return any…
Q: construct a linked list of address_t structures, each of which contained the four integers of an…
A: Structure Definition:The address_t structure is defined to represent a node in the binary search…
Q: 1) What are the two primary reasons for packet retransmission in TCP/IP networks? Explain each…
A: TCP/IP(Transmission Control Protocol/Internet Protocol) is a group of protocols employed for…
Q: For C++ how do write a program that accepts the number of miles driven and the number of gallons…
A: Step-1: StartStep-2: Declare variable miles & gallons and take input from the userStep-3:…
Q: Given a 10x10 array of integers called “cat”. Write the code in C required to outputspecific array…
A: The objective of the question is to write a C program that prints the values of the elements of the…
Q: 2. In the database systems explain the concept of ACID properties. Additionally, describe a scenario…
A: The database system is a software part which controls, operates and retrieves the data stored in a…
Q: When it comes to detecting indicators with the Pyramid of Pain, what is trivial for an attacker to…
A: Cybersecurity requires understanding the Pyramid of Pain paradigm. This helps prioritize threat…
Q: help for the mips code. dont use AI Q1)Suppose $t1 stores the base address of word array A and $s2…
A: Explanation:Q1) uses lw to load values from the array, addi for address calculations, li for…
Q: Create code Using Intellij IDEA (Using Spring intializer, language: java, type: Maven)
A: Developing a Web Application for Hurricanes Soccer AcademyThis guide outlines the steps to build a…
Q: Python help. 3) What is the difference between the Python identity operator (is/is not) and the…
A: 1.Identity Operator (is/is not) vs. Equality Operator (==/!=):The is operator checks if two…
Q: b) Write the method evaluateLight, which computes and returns the status of a light at a given row…
A: In this question we have been given with the description for Light Board.Part A:Write a constructor…
Q: Write a program in C to assist in circuit calculations (No previous knowledge in circuits is…
A: The objective of the question is to create a C program that assists in circuit calculations. The…
Q: Ex 1) Trace the following flowchart for when input is 11 and complete the trace table. Also write…
A: In this questionwe have to trace the given flowchart for filling the provided tables for each…
Q: What is the Manhattan distances heuristic value for the state shown on the left (with goal state…
A: In this question we have to solve for Manhattan distance for a given state of an 8-puzzle and also…
Q: help for the mips code. dont use AI, divi is not using in mips. Q1)Suppose $t1 stores the base…
A: Q1: if-else statement with array accessHere's the MIPS code for the if A[m+3]<20 condition:Code…
Q: Please give correct code. Thanks
A: Python3 code for the given problem: sorter.py# Importing sys module to read command line arguments…
Q: (b) What is the solution to the recurrence relation T(N) = 2T () + N? Show your working.
A: Therefore,T(N)=Θ(NlogN).Explanation:explanation of solving the recurrence relation T(N) = 2T(N/2) +…
Q: Director DW Griffith is one of the first directors to use parallel editing in his films. After…
A: In a poignant exploration of parallel editing's potency within Alien, let's spotlight an often…
Q: Ex 4) Trace the following flowchart for when input values are 12, 2, -3, 6, -11, -3, 1, -1 and…
A: As per our guidelines, we are supposed to answer only 1 question. Kindly repost the remaining…
Q: I keep getting the wrong answer can you please help me with this: Could you assist me with…
A: PDA stands for Push down automata and a pushdown automaton (PDA) is a theoretical computational…
Q: Visual basic>
A: VB.NET Code Public Class Form1 Private Sub btnCalculate_Click(sender As Object, e As EventArgs)…
Q: the LU factorization of the symmetric part of A(100*100)and verify that your factorization is…
A: In linear algebra, LU factorization, also called LU decomposition, is a technique that breaks down a…
coding in c
Step by step
Solved in 1 steps with 3 images
- For each of the following functions, indicate how much the function’s value will change it its argument is increased Triple.The following formula can be used to determine the distance an object falls due to gravity in a specific time period: d = 1⁄2 gt2The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the time in seconds that the object has been falling. Write a function named fallingDistance that accepts an object’s falling time (in seconds) as an argument. The function should return the distance, in meters, that the object has fallen during that time interval. Write a program that demonstrates the function by calling it in a loop that passes the values 1 through 10 as arguments and displays the return value.I need help with this code: Write a function to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is $500. There is a surcharge of $100 if the driver is under 25 and an additional surcharge for accidents: \# of accidents Accident Surcharge 1 50 2 125 3 225 4 375 5 575 6 or more 700 Then call the function to print the result. example (underline denotes input values): ```Age? 26``` ```Accidents? 3``` ```$725```
- Which statement below is true about a function: may have no parameters must always have a return statement must have at least one parameter its arguments always appear within bracketsThe following formula can be used to determine the distance an object falls due togravity in a specific time period:d =112 gt2The variables in the formula are as follows:• d is the distance in meters,• g is 9.8,• and tis the time in seconds that the object has been falling.Write a function named fall i ngDi stance that accepts an object's falling time (in seconds)as an argument. The function should return the distance, in meters, that the object hasfallen during that time interval. Write a program that demonstrates the function by callingit in a loop that passes the values 1 through 10 as arguments and displays the return value.Problem 2: Write a function called digitMatch. The function has three integer parameters first , second and third that are positive and have the same number of digits. It returns the number of positions where their digits match. For example, if the function was applied to 17345, 97813 and 17313 it would return 1 because only the 2nd digits match. If parameters have illegal values your function can operate however you choose. For example, a program that uses the function follows. int main() { cout <« digitMatch(168, 567, 767) « endl; // prints 1 cout <« digitMatch(143, 243, 343) « endl; // prints 2 return 0; }
- Write a function to determine the cost of an automobile insurance premium, based on driver's age and the number of accidents that the driver has had. The basic insurance charge is $500. There is a surcharge of $100 if the driver is under 25 and an additional surcharge for accidents: \# of accidents Accident Surcharge 1 50 2 125 3 225 4 375 5 575 6 or more 700 Then call the function to print the result. example (underline denotes input values): ```Age? 26``` ```Accidents? 3``` ```$725```How many return values may a function have?Write a function grade2number that takes a student's letter grade (A, B, C, D, F) as a char and returns the corresponding numerical score in the GPA (4.0, 3.0, 2.0, 1.0, 0.0). You should handle the case when the student enters an invalid character (e.g. G) by returning -1.0. Use a switch statement. The function will be called as in the code below. Γράψτε μία συνάρτησης grade2number> που παίρνει τον βαθμό ενός μαθητή ( A, B , C , D, F) ως χαρακτήρα (char) και επιστρέφει την αντίστοιχη αριθμητική βαθμολογία GPA ( 4.0, 3.0, 2.0, 1.0, 0.0 ) . Θα πρέπει να χειριστείτε την περίπτωση που ο μαθητής εισάγει μη έγκυρο χαρακτήρα ( π.χ. G) επιστρέφοντας -1.0 Χρησιμοποιήστε την εντολή switchy. Η συνάρτηση θα καλείται όπως στον παρακάτω κδικα. int main() { char grade; cout > grade; cout << "The GPA score is " << grade2number (grade); return 0;
- type E value and call function swap. purpose ob ques! foeus A litre is 0.264179 gallons. Write a program with the main function that will read in the number of litres of petrol consumed by the user's car and the number of kilometres travelled by the car and will then output the number of kilometres per uallon the car delivered. Define a function to compute the number of kilometres per gallon. Your program should use a globally defined constant for the number of litres per gallon. JusT -> +86 131 920 49572 mp notve What Telyn tT2 in Et ap ur Cause neeels t1y wills ybeAll functions must be designed to accept at least one argument. * That's true. That's untrue.An automated donation machine accepts donations via 10 or 20 bills to a maximum of $990. The machine needs to print a receipt with the donation amount in English, rather than numerically. Complete the following function which converts any number between 10 to 990 dollars to English.NOTE: You may define and use another function if necessary.NOTE: You should use arrays for this task. Use of switch statements or very long if/else if statements for printing is not allowed. However, using if/else if/else statements for the logic of your algorithm is permitted.NOTE: This function returns the result, and does not print it. Make sure the result is not lost when you return. Example function input and output (donation is 110):Input: 110Output: “one hundred ten dollars” string convertToEnglish (int donation); in C++ #include <iostream>#include <string>using namespace std; string convertToEnglish (int donation); int main() {int donation;cin>>donation;…