A warehouse gives a discount to customers based on the number of units sold. The current, non- discounted price is $75/unit. Write a procedure that gets the number of units the customer is buying via an input box. Send that number of units to a function which will return the discount. The original procedure will then calculate the total cost and puts all information on a spreadsheet. Be sure to properly format, via code, the information going on the spreadsheet. The discount schedule is: DISCOUNT (ON TOTAL UNITS SOLD COST) 100-200 5% 201-500 10% 501-1000 15% >1000 20%
Q: Your task is to implement a variation of the classic word game Hangman, which involves players…
A: Coded using Python 3.
Q: We can assign a value to each character in a word based on their position in the alphabet (a = 1, b…
A: Code function balanced(word) { let alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',…
Q: Given a letter, created a function which returns the nearest vowel to the letter. If two vowels are…
A: Algorithm - Take one string as input. Now use the below logic const char =…
Q: For this C++ hw Create a function called time2Greeting. It takes a time (in military time) and…
A: string time2Greeting(int time) { //declare the required variable string result; //using if-…
Q: Draw the following FlowChart in Raptor and upload the Raptor file into the assignment folder. Draw a…
A: To do: draw the flowchart
Q: Using VBA EXCEL, create a function read two numbers, a and b, and returns to ab. For example, in a…
A: To open VBA , press ALT + F11. In the menu bar, click on INSERT menu and select the PROCEDURE…
Q: Write a function that takes a "CustomerID" and returns a JSON list of product names and their total…
A: Note: Answering the question in python as no programming language is mentioned. Task : Given the…
Q: Need help to create the question below in Excel vba. Write a function called NextCell that takes a…
A: Public Function NextCell(CellAddress As String) As Boolean NextCell = Range(CellAddress).Offset(0,…
Q: Out Of Fgets() And Gets() Which Function Is Safe To Use And Why?
A: Fgets is a C programming function that reads a set limited number of characters from the given file…
Q: IN PHP Create a function that takes up both the letter unit and as many numbers as arguments.…
A: 1. Created the function and passes the String and List of integers 2. Create the new temp Array. 3.…
Q: Javascript I am stuck on a piece of code and I can quite figure out how to finish one part of this…
A: Solution:-- 1)The given question has required for the solution to be provided with the help of the…
Q: This function takes a list of points and returns the total distance of the path that results from…
A: I have implemented the given requirements as per the specification. The code is as follows: from…
Q: Final Exam triangle looks like the following: 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 1 1 Write a C++…
A: Program Approach:- Define header file using namespace. Using condition. Calculating the next row…
Q: Create a function which replaces all the x's in the string in the following ways: 1. Replace all x's…
A: 1. create the method with 1 argument 2. create the array and split the sentence with ' ' 3. map the…
Q: Pleaser fix the code below: Since functions should do a single logical task, there is no need…
A: Here we takes changes according to question. def Menu(menu_items,menu_prices): print("Menu Card")…
Q: Task 4 Take a string as a input from the user with all small letters. Then print the next alphabet…
A: Let's see step by step: 1. Take input of string in variable 's' 2. Now run a for loop from i=0 to…
Q: The following two functions P1 and P2 that share a variable B with an initial value of 2 execute…
A: Initial value of B is 2. P1() { 1.C=B-1 2.B=2*C } P2() { 3.D=2B 4.B=D-1 }
Q: Given two promises, create a function to determine whether the second promise is faster than the…
A: According to the information given:- We have to follow the instruction in order to get the desired…
Q: Given a letter, created a function which returns the nearest vowel to the letter. If two vowels are…
A: Note :- You have not mention the language of the program so i'm answering your question in java.…
Q: Programming Assign. Unit 5 Part 1 Encapsulate the following Python code from Section 7.5 in a…
A: Given: Programming Assign. Unit 5 Part 1 Encapsulate the following Python code from Section 7.5 in a…
Q: Create a function that finds the maximum range of a triangle's third edge, where the side lengths…
A: Program Description : We need to find out the third edge of triangle using the two other edge.So,…
Q: Given the following function definitions, write matching precondition and postcondition comments.…
A: In C++ programming languge, the comments are written by using the // or /* */. The symbol // is used…
Q: Each letter in a sentence is worth its position in the alphabet (i.e. a = 1, b = 2, c = 3, etc...).…
A: Code function getSentenceValue(str) { let regExp = /[:\[\];!\.,'\?-]/g let newStr =…
Q: In C- I am creating a word jumble game and till now I have come up with a function that will jumble…
A: I am attaching the modified code in C in the next step:
Q: { 'location': 'Paris', 'temp in C': 27.1, 'wind in kph': 38.4 }, { 'location':…
A: Soluton Vertical graph <!DOCTYPE html><html><script…
Q: Final Exam triangle looks like the following: 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 Write a C++ function…
A: Program Approach:- Ask to enter a number of rows and columns. Define the loop for row-column and…
Q: Your fitness tracking app is going to help runners stay on pace to reach their goals. Write a…
A: Program code to copy: import Foundation func progressUpdate(steps: Int, goal: Int) { let percent:…
Q: This Triangle Number is produced by a pattern of dots that form a triangle. The first 5 numbers in a…
A: The above sequence or pattern can be formulated as n*(n+1)/2 for Tn term. Code in Javascript:…
Q: my main.cpp, if there's anything wrong with it in relation to the assignment, please point it out…
A: It is defined as a direct descendant of C programming language with additional features such as type…
Q: Write a function that will take an email from the user as an input, check if the email is in correct…
A: def validateEMail(): mail = input("Enter EMail: ") flag = 1 if (mail.find("@") == -1):…
Q: IN Swift 3 A number sequence is as follows: 5, 100, 6, 200, 7, 400, 8, 800, 9, 1600, 10, 3200, Given…
A: To find nth term of series 5,100,6,200,7,400,8,800,9,1600,10,3200,.... Series can be considered in…
Q: Write a function which increments a string to create a new string. • If the string ends with a…
A: const incrementString = str => { const letters = [...str].filter(x => /[a-z]/g.test(x)).join``…
Q: 20.The 'int' command can be used for determining indefinite integrals and definite integrals. For…
A: Note since your question contain multiple sub-parts but we can answer only first 3-subparts at a…
Q: Create a function that takes three collections of arguments and returns the sum of the product of…
A: 1. Create the Function with 2 argument 2. create the nested function with 2 argument 3 create the…
Q: i. Often a location in the earth is denoted by longitude and latitude. For example, a location can…
A: Algorithm: Start the program. Read the latitude and longitude using vector. Check whether the…
Q: Create a function that takes three arguments prob, prize, pay and returns true if prob * prize >…
A: In this problem, we need to design the javascript programming language. Input - two argument…
Q: In this coding challenge, you will be retrieving email usernames from a string. You will write a…
A: NOTE - I have done the code using the python programming language. Here I defined the method named…
Q: Given two promises, create a function to determine whether the second promise is faster than the…
A: I give the code in Javascript along with output and code screenshot
Q: Write a program to illustrate the Ohm's Law, I=V/R. The program will first request to input an…
A: Program to calculate the current: #include <iostream>#include <iomanip>#include…
Q: Create a function that takes three arguments prob, prize, pay and returns true if prob * prize >…
A: We need to write a Javascript code for the given scenario.
Q: Create a function that determines whether each seat can "see" the front-stage. A number can "see"…
A: In this question we need to implement a function to check whether every person can see the…
Q: Write a function that will compare the candidate's response with the desired response, counts the…
A: def display(responses): correct_responses = ['D', 'B', 'D', 'C', 'C', 'D', 'A', 'E', 'A', 'D']…
Q: Write a program that will simulate a simple calculator. There will be four options: add two numbers,…
A: C++ code is as follows: #include <iostream>#include<math.h>//for inbuilt mathematical…
Q: Write a function that will take an email from the user as an input, check if the email is in correct…
A: Given data, Write a function that will take an email from the user as an input, check if the email…
Q: Jack and Jill are novice programmers of our CSC103 class. They are asked to write a function that…
A: Below is the given code: #include <stdio.h>int jack(int n, int i){ if(i<=9) {…
Q: Create a function that transforms sentences ending with multiple question marks? or exclamation…
A: In this problem, we need to provide the solution in the PHP programming language. Input - String.…
Q: In cell B14, create a formula without using a function that adds 1 to the value in cell B12 and then…
A: In cell B14 you need to enter the below formula - =(1 + B$12)*B13 Then copy the formula to the range…
Q: Student Test 1 Test 2 Test3 Average Student 1 Student 2 Student 3 Student 4 55 88 22 40 58 99 44 88…
A:
Q: Create a function that determines whether each seat can "see" the front-stage. A number can "see"…
A: Note: The programming language is not mentioned in the question so the python programming language…
Step by step
Solved in 4 steps with 2 images
- In G2:G11, the values should evaluate to the surname and the first character of the first name, with some punctuation. For example G2 should evaluate to Johnson R. What function should be used to achieve this? Choices: A. CONCATENATE B. MIN,MAX C. SEARCH D. RANK E. No choice givenIn G2:G11, the values should evaluate to the surname and the first character of the first name, with some punctuation. For example G2 should evaluate to Johnson R. What function should be used to achieve this? Min_Max Concatenate Rank No choice given SearchWrite a function that determines the number of missing entries for a specified column in the dataset. The function should return a string detailing the number of missing values.Function Specifications: Should take a pandas DataFrame and a column_name as input and return a string as output. The string should detial the number of missing entries in the column. Should be generalised to be able to work on ANY dataframe. ### START FUNCTION def total_missing(df,column_name): #code total_missing(df,'Age') Expected Outputs: total_missing(df,'Age') == "Age has 177 missing values" total_missing" (df,'Survived') == "Survived has 0 missing values"
- A handle to a function which returns a vector of rates of change Group of answer choices @F Xo % TimespanProgramming Assign. Unit 5 Part 1 Encapsulate the following Python code from Section 7.5 in a function named my_sqrt that takes a as a parameter, chooses a starting value for x, and returns an estimate of the square root of a. while True: y = (x + a/x) / 2.0 if y == x: break x = y Part 2 Write a function named test_sqrt that prints a table like the following using a while loop, where "diff" is the absolute value of the difference between my_sqrt(a) and math.sqrt(a). a = 1 | my_sqrt(a) = 1 | math.sqrt(a) = 1.0 | diff = 0.0 a = 2 | my_sqrt(a) = 1.41421356237 | math.sqrt(a) = 1.41421356237 | diff = 2.22044604925e-16 a = 3 | my_sqrt(a) = 1.73205080757 | math.sqrt(a) = 1.73205080757 | diff = 0.0 a = 4 | my_sqrt(a) = 2.0 | math.sqrt(a) = 2.0 | diff = 0.0 a = 5 | my_sqrt(a) = 2.2360679775 | math.sqrt(a) = 2.2360679775 | diff = 0.0 a = 6 | my_sqrt(a) = 2.44948974278 | math.sqrt(a) = 2.44948974278 | diff = 0.0 a = 7 | my_sqrt(a) = 2.64575131106 | math.sqrt(a)…Answer this question in JavaScript: Use the weather data set that's provided in the code var weatherData = [ { 'location': 'Paris', 'temp in C': 27.1, 'wind in kph': 38.4 }, { 'location': 'Nairobi', 'temp in C': 38.2, 'wind in kph': 3.5 }, { 'location': 'San Francisco', 'temp in C': 15.7, 'wind in kph': 12.8 }, { 'location': 'Tokyo', 'temp in C': 20.4, 'wind in kph': 8.8 } ]; Write a function to output a temperature graph like: Paris @@@@@@@@@@@@@@@ 27.1 Nairobi @@@@@@@@@@@@@@@@@@@@ 38.2 San Francisco @@@@@@@@ 15.7 Tokyo @@@@@@@@@@ 20.4 You should also write a function that produces a similar graph, but vertica
- This is my main.cpp, if there's anything wrong with it in relation to the assignment, please point it out and how to solve it. I can't get my functions.cpp to connect properly to the main.cpp. I need the functions.cpp first, anything else comes second. Thank you very much. main.cpp: #include <iostream> #include <fstream> #include <iomanip> #include <string> #include "functions.cpp" using namespace std; //struct for menuItemType struct menuItemType { string menuItem; double menuPrice; } void getData(menuItemType menuList[]); void showMenu(menuItemType menuList[], int x); void printCheck(menuItemType menuList[], int menuOrder[], int x); int main(); { // Declare functions and variables const int menuItems = 8; menuItemType menuList[menuItems]; int menuOrder[menuItems] = {0}; int orderChoice = 0; bool ordering = true; int count = 0; // Set the menu getData(menuList);…A teacher is compiling data and needs to find the number of B grades. A B grade is any score greater than 79 and less than 90. If the data is listed in B1 through B210, which function would count the grades correctly? a. =COUNTIFS(B1:B210,>79,B1:B210,<90) b. =COUNTIF(B1:B210,">79") c. =COUNTIFS(B1:B210,">79",B1:B210,"<90") d. =COUNTIFS(B1:B210,">79","<90")) Write a function that updates the year of a student, i.e. if year is “Year1”, then update to “Year2”, if year is “Year2”, then update to “Year3”, if the year is “Year3” then updated to “Graduated”.
- The accompanying Homeownership spreadsheet contains a partially completed spreadsheet model for computing the monthly costs of home ownership. Complete the spreadsheet model by inserting the formulas for monthly mortgage payment, monthly property tax, monthly homeowner insurance premium, monthly maintenance costs , and total in the appropriate cells. Variables: House value: $ 450,000.00 Interest rate: 4.25% Down payment (% of house value): 20% Number of years: 30 Property tax rate: 1.25% Annual homeowner insurance premium: $ 1,400.00 Maintenance cost rate (% of house value): 1% Monthly Cost of Home Ownership Monthly mortgage payment: Monthly property tax: Monthly homeower insurance premium: Monthly maintenance costs: Total: 1. Is this a deterministic or stochastic model? 2. Which of the following is NOT an input of the spreadsheet model? A. Interest rate B. Monthly mortgage payment C. Number of years of…Write a function to describe the following scenario. Jonathan is selling his old trading cards. Each customer that buys gets the first box they purchase for $10, and each additional box for only $5.Write a python program that return the total aquaculture production by Year, Region, and Type/Environment. You must disregard the Philippines in the region column. Use groupby to group rows according to the Year, Region, Type/Environment then apply the sum function to the Volume column to return total production per year. Create a line chart of the result that can be filtered by Type/Environment. Set the hvplot x parameter to Year and by parameter to Region, and groupby parameter to Type/Environment. Here is the dataset: