Given the formulas in Figure 11, write a program with the following functions to perform the calculations of area of trapezium and volume of cone. The program should include relevant validation processes. Area of Trapezium = ; xh x (a + b) %3D Volume of cone = - x mr? xh Figure 11 main() This function will display a simple menu to repeatedly prompt user for calculation options. If the user chosen the option to calculate the area of a trapezium, the program will call the areaofTrapezium() to perform the calculation process. If the user chosen the option to calculate the volume of a cone, then the program will call the volumeOfCone() to perform the calculation. The main() should display the answer of the calculation return from the functions. Sample menu: [A] Area of Trapezium B] Volume of Cone [Q] Quit Enter your option: areaOfTrapezium(
Q: A mall in Oman wants you to create a program that they can use to compute for the discounts to be…
A: discount : if Total amount is more than 500 the discount percentage is 2.5 Total amount is less than…
Q: Given the following function table, enter the Python code that implements the design in the box…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.
Q: Write a main function that performs the following: • Prompts user to enter 2 values A and B. • If…
A: Prompts user to enter 2 values A and B. If the first number A is less than the second number B,…
Q: Analyze the code below. Provide a case when the program will display "Unfortunately, you do not have…
A: I provided the answer of the above question. I hope this will be helpful for you..
Q: 2. Using if else statements in functions, write a program that prompts the user to input data for…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: at most one paragraph, describe a scenario that will require the use of multiple functions and…
A: A function averageScore(n) is used for: Entering score for n players. Calculate average and return…
Q: python Write a program that uses a custom function to return the cost of purchasing an item,…
A: Program Approach- Define the custom function named Calculate_tax() with parameters…
Q: 4. You want to order Burger from Chillox through the FoodPanda App. You have to calculate the total…
A: Given formula: Total price = meal_cost + delivery_charge + tax How total price is calculated: ('Beef…
Q: //The function must return the value indicated in the comments // The calcDiscountPrice function…
A: As given, we need to find out the variable value that needs to be returned from the function.
Q: # 1. Write a new function to multiply two numbers together and return the result 2. Write a new…
A: Put Below Code In you Program. Code #Write a new Function to multiply two numbers togather ad…
Q: QUESTION 2 Total interest amount = loan amount + (loan amount interest rate number of years) a)…
A: Answer: Algorithms: Step1: we have created function name as calcToInterest() and it takes three…
Q: Write a program to prompt user to enter value for fahrenheit degree and then computeand display the…
A: Hey, since there are multiple questions posted, we will answer first question. If you want any…
Q: a) Based on the requirement given below, prepare a flowchart for a program develop for PaintsForYou…
A: The flow chart can be drawn for the specified program output. The program actually obtains the…
Q: The Middletown Wholesale Copper Wire Company sells spools of copper wiring for $100 each and ships…
A: Program in c language
Q: Write a menu driven program with the following choice of submenu items: Enter 1 to convert from…
A: Begin Display Menu Enter user choice in n if n==1 run Fahrenheit() elseif n==2 run Celsius()…
Q: shipping company uses the following function to calculate thecost (in dollars) of shipping based on…
A: Below is required JAVA program: - Approach: - Importing the package. Defining the main class.…
Q: 2. Using if else statements in functions, write a program that prompts the user to input data for…
A: I am creating a structure item which holds following data : code : int price : float quantity : int…
Q: A company has 45 employers, 25 work as system developers (D) and (N) work as sales representer while…
A: Find the required queries given as below :
Q: If ax + bx + c = 0, a + 0, then x = b + Vb? - 4ac 2a Write a program to solve the quadratic…
A: According to the Question below the Solution: Program Output:
Q: 1. Design a C++ program named (permu_combi.cpp), that presents a menu to select to calculate…
A: C++ used to answer this question
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: Question 3) Write a user defined function called Menu that simulates a menu with options the user…
A: NOTE: As the programming language is not mentioned in the question. So, we have solved this question…
Q: QUESTION 2 An event for a company is designed to bring customers from Kuala Lumpur to a gathering in…
A: As the language is not specified answer written in c++ Introduction to the problem: 1)using if…
Q: Z Bank wants you to create a simple python program for calculating interest rate and Total balance…
A: #include <stdio.h> void main(){ //printf("Hello World"); func(); } void func(){…
Q: Given the following code snippet, which statement correctly allows the function to 1. total = 0 2.…
A: If you create a variable and it is same name inside a function, that variable will be local, and…
Q: on named FindMax_697 (where 697 is last 3 digits of your student number) that accepts three…
A:
Q: a) Based on the requirement given below, prepare a flowchart for a program develop for PaintsForYou…
A: Below are the flowchart diagram for the above instructions, which includes all the necessary…
Q: Write the function named totalSure, which finds out how long an object thrown obliquely will fall to…
A: C is a general-purpose programming language which can be used to develop software like operating…
Q: When the user clicks the Get Retail button, the program should do the following: Verify that the…
A: The solution is given below for the above given question:
Q: Create a function that will take in a users speed, then check to see if the speed is within: over…
A: Use an if-elseif ladder based on the function parameter speed and a respective message is printed
Q: Question 3) Write a user defined function called Menu that simulates a menu with options the user…
A: Given, Sample output: ********************** Select and option: 1: Blue Button 2: Green Button…
Q: A structure chart of the four functions is shown below. Design your program by following the…
A:
Q: void print_restaurant(RESTAURANT r) { /**
A: void print_restaurant(RESTAURANT r) { printf( "restaurant name is : %s\n",…
Q: Create two functions: • The first should accept two values and print out the modulus of the two…
A: <?php function print_mod($n1, $n2){ $result = $n1 % $n2; echo "Inside function. The modulus…
Q: A Moving to another question will save this response. Question 4 Write a function named timesFive…
A: Given:
Q: The electric company charges according to the following rate schedule: 9 cents per kilowatt-hour…
A: #include<stdio.h> #include<conio.h> int charge(int power){ if(power <= 300) return…
Q: QUESTION 1 Write a program to help a KJM Cafe to automate their breakfast billing system. a) The…
A:
Q: Question 2) Write a user defined function called AdvancedMenu that simulates a menu with options the…
A: For defining a function we have to look at the syntax of the function, and other syntax used in the…
Q: Exercise 8: Create a function that takes the sum of three numbers and returns the value Make sure to…
A: The C program to find the sum of three numbers using function
Q: Create a function called calculate_discount that accepts patient and returns the discount amount. If…
A: A Find the Discount Percentage Given the Marked Price Program Selling price as M and S of a thing.…
Q: Write a program that asks the user to enter an item’s wholesale cost and its markup percentage. It…
A: PROGRAM CODE: #include <iostream>#include <iomanip>using namespace std; // function…
Q: Digi offer three different subscription packages for its customers: Package A: For RM10 per month,…
A: - The question is to code the provided billing statement in C++.
Q: 3. Write a program that as the user to enter their 4 test scores. Based on their average test scores…
A: ANSWER:-
Q: (Conversions between Pounds and Ounces) Write the following two functions: // Convert from pounds to…
A: Given:
Q: Which of the following function that is correctly written and does not return any value in its…
A: Please find the answer below :
Q: Again, modify the while loop to utilize tolower() or toupper(). Create two more functions (options…
A: We need to write a c++ code for mentioned functions.
Q: when you call the function using EVG_Function(33, 44, 55, 66, 88, 7), what is * the result function…
A: Here we are given a function that takes 6 input parameters. Here we have the value stored to…
Q: 4. You want to order Burger from Chillox through the FoodPanda App. You have to calculate the total…
A: Default argument is set in function signature. Syntax: def function_name(variable1, variable2 = "1")…
Q: All task are of c++ language and done using functions. task1: Write program to print the…
A: Create a structure and initialize the values for the width and length of the roof, walls, and the…
Q: C program: Please write a program with call to functions to produce the output given below:…
A: I have provided C CODE along with CODE SCREENSHOT and OUTPUT SCREENSHOT----------------
Step by step
Solved in 2 steps with 1 images
- An event procedure invokes the GetBonus function using the statementdblBonus = GetBonus(dblSales). The function multiplies the sales amount passed to it by 3% and then returns the result. Which of the following is the appropriate function header for the GetBonus function?a. Private Function GetBonus(ByVal dblSold As Double)b. Private Function GetBonus(ByRef dblSold As Double) As Doublec. Private Function GetBonus(ByVal dblSold As Double) As Doubled. Private Function GetBonus(ByVal dblSold As Double, ByRef dblBonus As Double)Write a program in Python that simulates a bank. This is similar to what you did with your calculator program using functions. The customer's bank account should start out with a balance of $100.00 in the account (HINT: Balance = 100.0). The " Balance" variable should be a global variable. Provide the customer the ability to deposit money (Deposit), Withdraw money (Withdraw), and the ability to print out their balance (ShowBalance). Create a menu witht he above options that calls the respective function. Create functions for each of the tasks in your bank (deposit, withdraw, show balance). Your program should loop until the user decides to exit the program (HINT: Use 0 to exit the program like your calculator program). Make sure to design your Outline and Logic sections in a Word document. Upload your Outline and Logic document along with your Python code into this assignment when completed.Sumif, Countif Functions Kindly following the instructions below and enter the appropriate formula in cell. Name Electronics SELLING PRICE Results Patricia King Laptop $ 6,665.00 Sum all Electronics that equals "Monitor" and enter in D8. Patricia King Monitor $ 5,000.00 Charles Monaghan Printer $ 7,300.00 Fred Jones Projector $ 6,500.00 In cell D11 count all electronics for Patricia King. John Paul Headset $ 5,248.00 Charlie Brown Laptop $ 6,000.00 Pink Panter Monitor $ 4,400.00 $ 4,400.00 ITEM CAR MODEL SELLING PRICE Results Retro Style Billet Grille Chevy $ 319.00 In cell D17 Sum all Car Models that equals "Dodge". Hood Vent Dodge $ 55.00 Rear Spoiler…
- Sumif, Countif Functions Kindly following the instructions below and enter the appropriate formula in cell. Name Electronics SELLING PRICE Results Patricia King Laptop $ 6,665.00 Sum all Electronics that equals "Monitor" and enter in D8. Patricia King Monitor $ 5,000.00 Charles Monaghan Printer $ 7,300.00 Fred Jones Projector $ 6,500.00 In cell D11 count all electronics for Patricia King. John Paul Headset $ 5,248.00 Charlie Brown Laptop $ 6,000.00 Pink Panter Monitor $ 4,400.00 $ 4,400.00 ITEM CAR MODEL SELLING PRICE Results Retro Style Billet Grille Chevy $ 319.00 In cell D17 Sum all Car Models that equals "Dodge". Hood Vent Dodge $ 55.00 Rear Spoiler Mustang $ 220.00…You want to order Burger from Chillox through the FoodPanda App. You have to calculate the total price. Write a function which will take the name of the burger and place(Mohakhali/Outside of Mohakhali) as input. Use default argument technique for taking place input.Create a function that will take in a users speed, then check to see if the speed is within: over 200, it will print: Mario Andretti, slow down! 100 to 50, it will print: Too fast! if it does not meet these conditions then the program will print: You are within the speed limit! My code is def speed_limit(): while speed_limit > 200: print("Mario Andretti, slow down!")
- Write a program that will perform one of the following operations:1. Print the Fibonacci series from 0 to N2. Print the Prime numbers from 0 to N3. Print the Factorial of the numbers from 0 to NInclude at least the following functions in your program:• menu: a function to display the operations listed aboveo Use a switch-statement to process the user’s choice• fibonacci: a function that will print the Fibonacci series from 0 to N o Sample Input: Suppose N = 5o Sample Output: 0 1 1 2 3 5 • primeNumbers: a function that will print the prime numbers from 0 to N o Sample Input: Suppose N = 5o Sample Output: 2 3 5 • factorial: a function that will print the factorials of the numbers from 0 to N o Sample Input: Suppose N = 5o Sample Output: 0! 1! 2! 3! 4! 5! = 1 1 2 6 24 120 Include a loop that will allow the user to repeat the whole program if he wants to. PLEASE add "//" every code wirtten to explain its use in the program. thank you! do the following conditions set and DO IT IN C++Draw the following FlowChart in Raptor and upload the Raptor file into the assignment folder. Draw a table variable (for a, b, M) on a paper assuming the user insert M=7 when it is asked by raptor, and upload it to the assignment folder. Which of the following are final values for n and sum, if the user inserts M=7 when it is asked by Raptor? Capital and Lowercase M is similar in this example (m=M) On paper, write what is the purpose of this algorithm. a = 1, b=2, m=7 a = 2, b=4, m=7 a = 8, b=8, m=7 a = 16, b=16, m=7 a = 16, b=16, m=83. Which among the following shows a valid use of the Direction enumeration as a parameter to the moveCharacter function? Select al that apply. enum Direction { case north, south, west, east}func moveCharacter(x: Int, y: Int, facing: Direction) {// code here} moveCharacter(x: 0, y: 0, facing: .southwest) moveCharacter(x: 0, y: 0, facing: Direction.north) moveCharacter(x: 0, y: 0, facing: .south) moveCharacter(x: 0, y: 0, facing: Direction.northeast)
- In this task, you need toevaluate the following four expressions and demonstrate atleast 5steps of evaluating them. a) -(4%2-1/3+5*6) b) ! (( 3 > 5) && ( 6 < 2)||(1==4)) c) (6%2)! = (4/5) == (3*7) d) ! true || false && ((false &&true)||(true&&false))99.Code in Develop a Java program using NetBeans for Codex. Your program should initially display a menu to the user. The menu should have three options, namely (1) Register for a Training Programme (2) Check Registration details (3) Exit Program (see Figure 3 attached). The program should make use of two functions, registerApplicant() for registering a new applicant andsearchDetails() for searching the registrant details. The registerApplicant() function should accept four lines of arguments namely: the registrant’s name, the registrant’s surname, the registrant’s ID number and training programme. It should then write these details to a text file.To write to the text file or retrieve the product details from the text file, you must have a text file to which you write and store the registrant details. Your text file should be named registrants.txt Also, ensure that the program repeatedly shows the menu until the point when option 3 is selected which terminates the program.In order for a player to navigate your game, you will need to develop a function or functions using Python script. Your function or functions should do the following: Show the player the different commands they can enter (such as “go North”, “go West”, and “get [item Name]”). Show the player’s status by identifying the room they are currently in, showing a list of their inventory of items, and displaying the item in their current room. You could make these separate functions or part of a single function, depending on how you prefer to organize your code. #Sample function showing the goal of the game and move commands def show_instructions(): #print a main menu and the commands print("Dragon Text Adventure Game") print("Collect 6 items to win the game, or be eaten by the dragon.") print("Move commands: go South, go North, go East, go West") print("Add to Inventory: get 'item name'") #In this solution, the player’s status would be shown in a separate function. #You may organize your…