2. Compute the cost based on the following: If the quantity is less than 10 the cost is quantity times price. If the quantity ordered is 10 or more, there is a 10% discount. Print a message that there is a 10% discount and print the discounted price. Calculate the discounted cost. Print the cost, with exactly 2 decimal places. So if 10 were ordered at 12.50 you would print: Discount of 10% applies: Discount of 1.25 per item. Discounted price is 11.25 Cost is 112.50 If 5 were ordered you would print: Cost is 62.50 (5 x 12.50)
Q: The sale policy of the company depends on many factors according to the following. • if item in…
A: Note: Data given in the question is not clear. so, random data is considered as shown below:…
Q: A retail store has a preferred customer plan where customers can earn discounts on all their…
A: Java program for the given criteria is as follows, File name “Person.java” class Person {…
Q: Q 16 ) Identify the correct statement in C language for the following mathematical expression? 33…
A: C-language allows using various operators to evaluate or verify mathematical expressions.…
Q: Given the following salaries in $1,000, the average salary is and the most common salary is…
A: Answer : total salary is given = $1000 We have given number of salaries count = 8 Salaries : 50 ,…
Q: QUESTION 1 The % Daily Value (or %DV) shows how much of a nutrient is in one serving of a packaged…
A: SUMMARY: - hence we discussed all the points.
Q: Suppose that an auction system is under development. Which of the following is an invalid use case…
A: Correct answer is; d. Return item
Q: I need help with R < RStudio Can you help me with the function of any university student who has…
A: Answer: I have done code and also I have attached code as well as code screenshot.
Q: e of ticket do you require, single or return?" IF the customer chooses "return": Ask: "What rate,…
A: What is the minimum number of tests that are needed to ensure that all the questions have been…
Q: A retail store has a preferred customer plan where customers can earn discounts on all their…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: quantity=3; price=9 (quantity >3) &&(price<=9) Find the output for the above expression? a.…
A: quantity=3; price=9 (quantity >3) &&(price<=9) Find the output for the above…
Q: The registration fee for at an institute is 1000 dirhams if you register for 5 courses or less.…
A: Define variable num and take user input for number of courses in it. Use if else condition to check…
Q: You have 6 roses with you, and now you need to decide what bouquets to make in order to maximize…
A: The answer is given in the following steps for your reference.
Q: Suppose that 10,000 people are given a drug test that is 98.2% accurate and that 500 of the people…
A: Given:- Suppose that 10,000 people are given a drug test that is 98.2% accurate and that 500 of the…
Q: You own a fruit shop. You buy fruit from suppliers by weight (cost per kg), and then you sell it…
A: This schema will have multiple tables.
Q: Suppose that G(x) = B0 + B1*x + B2*x^2 + B3*x^3 + B4*x^4 + .... Suppose that G'(x) = F(x). What is…
A: We solve assuming that the highest degree in G(x) is 4.
Q: 8. Consider the following: An online trading company wants to offer discounts to new customers. The…
A: A truth table is used to represent the output of a boolean function for all possible combinations of…
Q: INPUT: All integer, no validation or ranges needed. Although the user can enter whatever numbers…
A:
Q: 1.) Evaluate the given expression Given i=1, j=2 k=3, I=2, x=4, y=5 i y What data type is…
A: We need to find output value and choose a datatype to hold exponential value.
Q: 0 In excel, let us consider D5=59 than the logical test result of IF(D5>59,"D","F")) will be Select…
A: initially we open excel and going to 5th row and type 59 which shows D5=59 after that type…
Q: Suppose that 10,000 people are given a drug test that is 98.2% accurate and that 500 of the people…
A: Given, this information is calculated on the above basis. Accurate error total Non-user…
Q: Main Street Bank is offering an annual interest rate discount based on the client’s credit score.…
A: // PaymentSchedule.java import java.util.Scanner; public class PaymentSchedule { public static void…
Q: Identify the correct statement in C language for the following mathematical expression? 33 && price…
A: < First operand less than second operand > First operand greater than second operand ||…
Q: If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first…
A: Note:- I am taking the Python part. Program Plan:- In First TODO part just print the…
Q: False positive and false negative ratios may also be tweaked, and they're mostly mutually…
A: False negative authentication The false positive rate occurs when an unauthenticated user…
Q: Company ABC Name of salesman Total of sales Commission Next salesman (Press Y if yes /Press N if…
A: Note:- Since programming language is not mention we are providing solution in python programming.…
Q: An analyst is constructing a simple model to determine the gross and net profit of a product, given…
A: Required: Excel An analyst is constructing a simple model to determine the gross and net profit of a…
Q: Draw the decision table for the following scenario: Suppose a customer would like to withdraw money…
A: Answer: We need to write the decision table for ATM withdrawable and we have explain in brief
Q: Convert the following NFA to a DFA. For full credit, your DFA states should be labeled indicating…
A: I Have answered this question in step 2.
Q: All integer, no validation or ranges needed. Although the user can enter whatever numbers they wish,…
A: c = int(input("Enter cost of the production: ")) a = int(input("Enter price of a seat in band-A: "))…
Q: ur employees work in a company: Ahmed, Zaid, Jassem, and Kazem. They receiv monthly salary of: 1500…
A: From the accompanying table, compose a SQL question to find those representatives who work in the…
Q: A store provides 10 percent discount on all items with a price of at least $100. No discount is…
A: I have given an answer in step 2.
Q: Suppose that your company is trying to decide whether it should buy special equipment to prepare…
A: Solution is in Step 2.
Q: WAPto take cost price and selling price of an item calculate and print either profit or loss
A: Here is the C++ program as per the instruction: #include <iostream>using namespace std;//…
Q: printf('Cost at initial theta (zeros): %f\n', cost); printf('Expected cost (approx) : 0.693\n');…
A: function featureNormalize(x) rows = size(x,1) cols = size(x,2) μ = mean(x,1) σ = std(x,1) xNorm =…
Q: Below is the EMP table EMPNO ENAME SALARY A29 PANKAJ 10000 A23 SAHIL…
A: count() returns the number of records that are present
Q: A small group of goats are kept in the petting section of a local zoo. Competition would occur…
A: According to given question small groups of goats are kept in a zoo. Increasing more number of goats…
Q: The seller has a whole new store for sale "buy 2, get 1 for free". For legal reasons, they are…
A: SUMMARY: - Hence, we discussed all the points.
Q: need a Python code that can regress Bitcoin price with 3 different technical analysis methods. We…
A: import pandas as pdfrom sklearn import linear_model data=pd.read_csv("/home/desktop/BITCOIN…
Q: 13. Draw a DFA which accepts exactly one "ab". Σ= {a,b} Or, Draw a DFA which accepts exactly two…
A: A deterministic finite state automaton is a 5-tuple (Q, Σ, δ, q0, F) where Q denotes the finite set…
Q: a. Name of the Error. b. How to resolve. c. Ways to avoid such errors in the future.
A: Name of the error: Windows displays 0xc000025 it with a message saying Your PC needs to be repaired…
Q: Negotiating a consumer loan is not always straightforward. One form of loan is the discount…
A: Algorithm: Start READ loanAmount READ interestRate READ loanDuration Compute: year =…
Q: of 90% for all her subjects she will still be able to study medicine but will have to complete a BSc…
A: Pseudocode is a set of shortened steps which is used to solve a problem by implementing in a…
Q: An annual discount factor is a multiplier for each year based on the discount rate and year. Select…
A: Task - true/false for given statement.
Q: b) Determine which employee works for what city and report their increase based on the city they…
A: Below is the required sql block:
Q: Build a decision table and simplify the same. Customer can withdraw money from ATM. ATM machine pays…
A: A decision table is a superb tool to use in each testing and necessities management. primarily it's…
Q: see picture to solve. Just need to know which formula to use. 6 ticket revenue. B. = B1*B2, =B1*B3,…
A: Dear Student, I am solving this question based on spreadsheet.
Java
Step by step
Solved in 3 steps with 3 images
- The cost of renting a room at a hotel is, say $100.00 per night. For special occasions, such as a wedding or conference, the hotel offers a special discount as follows: If the number of rooms booked is at least 10, the discount is 10%; at least 20, the discount is 20%; and at least 30, the discount is 30%. Also if rooms are booked for at least three days, then there is an additional 5% discount. Write a program that prompts the user to enter the cost of renting one room, the number of rooms booked, the number of days the rooms are booked, and the sales tax (as a percent). The program outputs the cost of renting one room, the discount on each room as a percent, the number of rooms booked, the number of days the rooms are booked, the total cost of the rooms, the sales tax, and the total billing amount. Your program must use appropriate named constants to store special values such as various discounts.ABC is a retail store selling products for day-to-day use. Consider that a customer is buying any three types of products from ABC store, where each product has a fixed price on it. After choosing the products, the customer has to go to the cashier and can ask any of the following services: Please note that you have to choose the three products of your choice with some appropriate prices available in the retail store. 1. Make a new purchase: The cashier enters the number of items for each type of product then the program calculates the total price, apply a VAT of 5% and displays the payment amount to the customer 2. Exchange an item: The cashier enters the code of the product to be exchanged and the code of the new product. The program displays the amount to be reimbursed to the customer or to be added by him taken into consideration the VAT percentage. 3. Check the price of one product: The cashier enters the code of the product and the program displays its price. You are requested…If X = 18 and Y = 32, find the value of (X | Y) and (X || Y)? Select one: a. 50, 1 b. 2, 40 c. 1, 50 d. 40, 2
- Scenario:One of the renowned supermarket in Dhaka City, “Shwapno” is celebrating their firstanniversary of opening. They have become very popular among people in a short amount oftime. As a method of celebration they have designed three interesting and exciting offer for theircustomers for that day only!! The offers are described as follows:Offer 1: This offer says, if the name of any customer starts with “S” OR ends with “o”, theywill receive a gift which contains 1 kg miniket rice and 1 litre soyabean oil. This offer isdedicated from their name, Shwapno.Offer 2: This offer says, if one customer have taken products and his/her total product weightis less than 1.50 kg, then Shwapno will give all the products to the customer for free. If the totalweight is 1.50 kg or more, the customer will have to pay the full amount.Offer 3: This offer says, if a customer is aged less than 15, then he/she will receive chocolates.If aged 15 or more, then no gifts for the customer.Implementation:Create…suppose someone pays 100.00 during the first year and that yearly payment keeps on doubling. Display the year where yearly payment is greater than 50,000.00Suppose you are a computer salesman and your income depend on the total sales and commissions earned for the computers that you sell. Commission rates vary depending on how many units you sold (see chart below). Your income equals to the total sales plus the commission where the commission equals to total sales times the commission rate. That is, commission = total sales * commission rate and income = total sales + commission. Total Sales Commission rate % Less than 200 sold 8% Greater or equal to 200 sold 10% Greater than to 400 sold 12% 1. Provide the user the commission rate list above. 2. After displaying the list, prompt the user to input the total sales. 3. Display the total income. Input: The input to your program will be from the keyboard (using Scanner). Output: The output of your program should be to the screen and include the correct answers. Run: Run it three times to be sure all possible values of the if logic works correctly.
- Your English professor has announced the following grading policy: For each essay, the highest score in the class will be entered as a 100%; all other scores will be entered as the percent of that top score. For example, if the highest essay is a 50 out of 100, it will be counted as a perfect paper, and essays with a score of 40 out of 100 will be entered as an 80%. The final grade for the course will be determined using these adjusted percentages, with 90% and above an A, 80% and above a B, 70% and above a C and below 70% not passing. The students all get together and decide not to work hard on the next paper because if nobody does well, they will all do okay. This plan results in a Nash Equilibrium. A.) is a solid commitment device, and thus stable. B.) will be unstable because there is an incentive to break the agreement. C.) will be stable because there are no incentives to deviate. D.) requires everyone to follow their…ASAPWhenever you mail a letter, you must decide how much postage to put on the envelope. You like to use this rule of thumb – use a stamp for every five sheets of paper or fraction thereof. For example, if you have 11 sheets of paper, then you use three stamps. Since you’re parsimonious, if an envelope requires more than three stamps, then you simply don’t mail the envelope. Show how the number of stamps per envelope would be calculated. Provide a solution in the form of pseudocode. Your pseudocode must read in appropriate data and print how many stamps to use.
- There are two isotopes of an unknown element, X-19 and X-21. The abundance of X-19 is 14.29%. A weighted average uses the percentages of each isotope to scale their contribution to the total mass. Each isotope's contribution is the percentage (in decimal form) multiplied by the mass of the isotope. What is the contribution (in amu) to the weighted average from the X-19 isotope, which has a mass of 19.00 amu?This must be done using CORAL language. Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 or 95) go north/south, and evens (like the 10 or 90) go east/west. Auxiliary highways are numbered 100-999, and service the primary highway indicated by the rightmost two digits. Thus, the 405 services the 5, and the 290 services the 90. Given a highway number, indicate whether it is a primary or auxiliary highway. If auxiliary, indicate what primary highway it serves. Also indicate if the (primary) highway runs north/south or east/west. Ex: If the input is: 90 the output is: The 90 is primary, going east/west. Ex: If the input is: 290 the output is: The 290 is auxiliary, serving the 90, going east/west. Ex: If the input is: 0 or any number not between 1 and 999, the output is: 0 is not a valid interstate highway number."You have been asked to create a guessing game with four players. The players will be asked to guess which word will be selected next and earn points for each correct guess." The game works as follows: First: At the start of the game: Each of the four players is asked to enter their name and the amount of money they wish to bet on the game (only positive values less than $100 are allowed). The total of all four bets is the price money for the game. •The players will be asked to select which set of words they wish to use for the game. The options are: Fruit Colors Animals Each set of words must have at least seven options (You may choose your own words for each set). Once the players select a set of words the computer will display the full list of options. For example: You have selected the Fruit word set. The possible words are: Apple, Orange, Banana, Kiwi, Strawberry, Grape, Cherry Second: Each game will consist of seven rounds. Each round goes as follows: Each player is…