The seller has a whole new store for sale "buy 2, get 1 for free". For legal reasons, they are unable to charge their customers $ O per article so that the discount applies to all products instead. For example, if a customer receives three products a, b and c: Product A Product B Product C $15.99 $ 23.50 $ 10.75 He gets very cheap for free, so he ends up paying $ 15.99 + $ 23.50 = $ 39.49, but his receipt says: Product A: $ 15.99 Special Discount $ 12.57 Product B: $ 23.50 - Special Discount $ 18.47 Product C: $ 10.75 - Special Discount = $ 8.45 %3D
Q: There are two A, B players playing the game. Player A is angry with him, and player B is angry with…
A: Problem Explanation: If A adds 'a' to w in the first movement, B can add 'a' and form a string w =…
Q: There are two A, B players playing the game. Player A is angry with him, and player B is angry with…
A: Algorithm: Firstly take input for test cases Then take the input for the test cases values then we…
Q: You are interested in which users are on the site at the same time. For example, you are given the…
A: Here we will iterate over in array and find for how many in and out it lies in between and also…
Q: er with three equal sections is being used in a game. One section is labeled “0 points,” and two…
A: It is defined as a possibility. It deals with the occurrence of a random event. The value is…
Q: A salesman would like to visit a set of n cities. The cities are connected pairwise by a direct…
A: A salesman would like to visit a set of n cities. The cities are connected pairwise by a direct…
Q: A very successful cinema director named "Chef" decided to solve the problem. When a customer wants…
A: Input - Output Defination: Input begins with an integer T: the number of test cases.Each test case…
Q: In a candy store, there are N different types of candies available and the prices of all the N…
A: In this question, we are asked to write a program in C++ where we have to print minimum amount of…
Q: We are buying a guidebook and a towel for a total sum of 110 dollars. The guidebook costs 100…
A: Let the cost of guidebook be g. Let the cost of towel be t.
Q: In a candy store, there are N different types of candies available and the prices of all the N…
A: Code is given below as :
Q: Suppose, you are working in a company 'X' where your job is to calculate the profit based on their…
A: Program code: class FinalQ: def print(self,array,idx): if(idx<len(array)):…
Q: Calculate income tax for the given income by following the below rules: Total Income Rate (in %)…
A: In the above code, it has been asked to print the income tax on the given income, in the following…
Q: In the game of blackjack, the cards 2 through 10 are counted at their face values, regardless of…
A: Ace value =11 if Sum of cards in a players hands do not exceed 21. else Ace value =1 Input string…
Q: A vending machine is an automated machine that provides items such as snacks and beverages to the…
A: The answer is given below:-
Q: no matter she picks I or 2 coins, Bob will get the last coin and win the game. Given the definitely…
A: We are given that both the players are very smart. So, both of them will make a move that will…
Q: In a contrapositive statement, a user implements a line mentioning values with a correlation of Q ->…
A: Solution: In the contrapositiveof the condition statement Q→P is the condition statement -P→-Q is…
Q: ibrary must build shelving to shelve 200 4-inch high books, 150 8-inch high books, 300 10-inch high…
A: Lets see the solution.
Q: Suppose, you are working in a company 'X' where your job is to calculate the profit based on their…
A: Note:- I am taking the Python part. Program: class FinalQ: def print(self,array,idx):…
Q: Dreamworld is known for is uniqueness and there are 2 different denomination coins in Dreamworld,…
A: Input : Number of test cases Value of N Output : Possible number of cents
Q: Suppose, you are working in a company ‘X’ where your job is to calculate the profit based on their…
A: Answer : GIVEN THAT:-- Step 1 Note:- I am taking the Python part. Program Plan:- In First TODO part…
Q: QCC Casino Royale offers its customers a happy way to go home with big bucks playing its “Dice”…
A: Let's understand step by step : 1. First welcome customer with appropriate message. 2. Declare…
Q: Raghu and Sayan both like to eat (a lot) but since they are also looking after their health, they…
A: To do: Code
Q: Let C (x, y) =" x likes y "and domain of x and y are all people. Then the statement "There are…
A:
Q: An electricity distribution company wants to calculate the electricity fee to be paid by the…
A: As no programming language is mentioned it is solved using basic C++
Q: Dreamworld is known for his uniqueness and there are 2 different denomination coins in Dreamworld,…
A: GIVEN: N : number of tosses Have to print total permutation with first coming having head Algorithm:…
Q: Suppose, you have been given a non-negative integer which is the height of a ‘house of cards’. To…
A: Since no language is mentioned, So I Coded using Python 3.
Q: o woman works for any man. b. Every woman works for some man. c. Some woman does not work for any…
A: (∃x)(W(x) ∧ (∀y)(M(y) → [W(x, y)]')) Here, two quantifiers are used: ∀ (for all) and ∃ (for some).…
Q: [Very Hard] Suppose, you are working in a company ‘X’ where your job is to calculate the profit…
A: Note:- I am taking the Python part. Program Plan:- In First TODO part just print the investment…
Q: Suppose we have a nice young couple who borrow $700000 from the bank, at an annual interest rate of…
A: monthly.payment<-2000 im<-(1+3.124/100)^(1/12) # annual interest is in percentage convert into…
Q: A paint company is trying to recycle unpopular paint colours by mixing them together to create…
A: MATLAB is a programming platform designed specifically for engineers and scientists to analyze and…
Q: Suppose, you are working in a company ‘X’ where your job is to calculate the profit based on their…
A: If the company invests 100,000 USD or less, their profit will be based on 75,000 USD as first…
Q: A vending machine is an automated machine that provides items such as snacks and beverages to the…
A: i give this question answer in next step with full description
Q: A very successful cinema director named "Chef" decided to solve the problem. When a customer wants…
A: Algorithm: Firstly we will take input for the number of test cases. After that we will take the…
Q: here is a promotional offer in a bookstore "Take 3, pay for the 2 more expensive ones". So, each…
A: #include <iostream> #include <math.h> #include <algorithm> //#include…
Q: A bank teller has money available in the form of 4 denominations of 1, 5, 50, and 100. Whenever a…
A: Lets see the solution.
Q: You are given n users, and their times that they log in and out of a website: You are interested in…
A: Solution:-- 1)As given in the question it has required for the solution which is to be provided as…
Q: Computer Science Investing in stocks is a way to create assets that are supposed to provide…
A: Stock.java public class Stock{ //Design a class, Stock, with instance variable cost. private…
Q: I. Let P (x) be the statement "2x = x2." If the domain consists of the integers, what are the truth…
A: 1. P(x) is given as 2x = x2. The domain consists of integers. The given options can be checked for…
Q: A salesman has a number of cities to visit. They want to calculate the total number of possible…
A: According to the information given:- We have to follow the instruction in order to get desired…
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: A very successful cinema director named "Chef" decided to solve the problem. When a customer wants…
A: It is defined as a powerful general-purpose programming language. It can be used to develop…
Q: If (f(w,x,y,z) = (x+yz) + (wx). What is f(1,0,0,0)
A: Given Boolean function is: f(w,x,y,z) = (x+yz) + (wx) It is a four variable function and the…
Q: Fix the example such that the cost of frozen yogurt is O if you pour exactly 1 Ib. in your cup. * 1…
A: Here, we are checking if weight is less than 1 and also weight is greater than 1 So, you can add the…
Q: There are three financial aid counselors. If a student’s last initial is from A – H, let them know…
A: Solution - Programming language - C All necessary comments are included in program code. Program…
Q: Imagine playing a number guessing game. A side is a number from 0 to N he's holding it, and the…
A: I write code in java because this is easy to understand and programming language is not mentioned in…
Q: Suppose an ATM has two sections of 1000 and 500 rupees note. There are 20 notes of 500 and 10 notes…
A: total_1000notes=10 total_500notes=20x=Truewhile (x==True): amount=int(input()) if…
Q: Encode the problem and create an initial population of 4 different chromosomes. Explain what would…
A: 1) Because it can be used to identify global optima in constraint issues, the Genetic algorithm may…
Q: Consider the following game (anachronistically) called the battle of the sexes. Two brothers, Shahid…
A: Here is the solution:
Solve
Step by step
Solved in 3 steps with 1 images
- ASAPABC 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…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…
- 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.QCC Casino Royale offers its customers a happy way to go home with big bucks playing its “Dice” game. The Dice game is played by asking customers to roll a pair of dice. If customers roll a seven or 11, they win; any other roll and the customer loses. The odds of rolling a seven is 6 to 1 so that if customers bet 1 dollar and win, they receive 7 dollars. The odds of rolling an eleven are 18 to 1 so that if customers bet 1 dollar and win, they receive 19 dollars. Upon entering the casino, customers must be greeted with an appropriate welcoming message. They must be asked to indicate the amount of money that is in their bankroll to play. Customers cannot enter the casino with a bankroll greater than $1,000. Customers must play the game in rounds of 10 plays and the minimum bet for each play is 5 dollars; the maximum bet is 50 dollars. For each try at rolling the dice, customers must be asked how much they want to bet and for each try must be informed of the result and the…In the game of blackjack, the cards 2 through 10 are counted at their face values, regardless of suit, all face cards (jack, queen, and king) are counted as 10, and an ace counted as either 1 or 11, depending on the total count of all the cards in a player's hand. The ace is counted as 11 only if the resulting total value all cards in a player's hand. The ace is counted as 11 only if the resulting total value of all cards in a player's hand does not exceed 21, else it is counted as a 1. Using this information write a C++ program that accepts three card values as inputs (a1 corresponding to an ace, a2 corresponding to a two, and so on), calculates the total value of the hand appropriately, and displays the value of the three cards with a printed message.
- A movie theater offers a package that typically consists of a movie ticket, a snack, a drink and a free gift, a patron must present a ticket to enter the theater, but snack, drink and free gift are optional. So the ticket can be decorated by snack, drink and gift. This gives patron flexibility to purchase any number of tickets and snack/drink, however, free gift is limited to 1 per package order. Each snack and drink can be multiple or partial. The cost of multiple or partial is adjusted proportionally. For example, cost of 2 coke is 2 x $2, half popcorn is 0.5 x $6 We would like to use the Decorator pattern and Singleton pattern to create the receipt to show order's item name, quantity, item unit price, item cost and final cost. The singleton is to ensure that a patron can get no more than one free gift for his/her order Here is the unit price of each item • Ticket, Adult: $10; Senior/Student: $8 Popcorn (decorator), $6 • Chips (decorator), $4 • Drink (decorator): Coke: $2; Sprite: $2…Problem You have a fence post located at the point (x,y) where a goat is tethered by a rope. You also have a house, which is a rectangle with diagonally opposite corners at the points bottom-left: (x1,y1) and top-right: (x2,y2). You want to pick a length of rope that guarantees the goat cannot reach the house. Determine the minimum distance from the fence post to the house, so that you can make sure to use a shorter rope. Recall that the distance formula is: (x2−x1)2+(y2−y1)2 The input consists of a single line containing six space-separated integer values: x, y, x1, y1, x2, and y2. You are guaranteed that x1<x2 and y1<y2, and that (x,y) is strictly outside the axis-aligned rectangle with corners at (x1,y1) and (x2,y2). Return the minimum distance from the goat’s post to the house as a floating-point value from main(). Learning Objectives Be able to create a program with a lesser template. Be able to calculate the min/max of integers. Be able to write a mathematical…A hardware store is selling steel rods of various lengths. However, customers sometimes want to buy rods that the store doesn't carry. For example, if the store only carries 10cm and 30cm rods and a customer wants to buy a 25cm rod, then the order cannot be fulfilled. To boost sales, the store has come up with an idea to weld two rods together to make a longer rod. For example, if the store only carries 3cm and 5cm rods and a customer wants to buy a 8cm rod, then the order can be fulfilled by welding together 3-cm and 5-cm rods. Since rod welding can compromise the strength, the store will only weld up to TWO rods together. More precisely, this means, an order for x cm can be fulfilled if there is a single rod of length x or there are two rods (potentially of the same length) whose combined length is x. Your Task: Write a function process Orders (orders: List[int], sizes:List[int]) -> List[bool] to determine whether or not each of the given orders can be fulfilled. Here, orders is a…
- You are given n users, and their times that they log in and out of a website: You are interested in which users are on the site at the same time. For example, you are given the following 5 users and their times: User 1- In: 1 Out: 4 User 2- In: 2 Out: 5 User 3- In: 7 Out: 8 User 4- In: 9 Out:10 User 5- In: 6 Out:10 This gives the distinct users that are on the site at the same time as (1,2), (4,5), and (3,5). Given n elements, write pseudocode for an algorithm that would take n^2 time to compute the number of pairs of users that are on the site at the same timeInterest on a credit card’s unpaid balance is calculated using the average daily balance. Suppose that netBalance is the balance shown in the bill, payment is the payment made, d1 is the number of days in the billing cycle, and d2 is the number of days payment is made before billing cycle. Then, the average daily balance is: averageDailyBalance =netBalance x d1-payment x d2d1 If the interest rate per month is, say, 0.0152, then the interest on the unpaid balance is: Interest= averageDailyBalance * 0.0152 Write a program using c++ compiler that accepts as inputnetBalance, payment, d1,d2, and interest rate per month. The program outputs the interest. Format your output to two decimal places.Shamira Laundry has designed a new calculation system for their shop. The price for each type is as follows: 10 Туре Price Clothes RM 15 for 1 kilogram blankets / towels RM 6 for 1 kilogram RM 10 for 1 kilogram comforter Only one type can be washed at a time. This laundry shop also provides discounts to its customers as follow: Total price >= RM30 Discount 10% from total price >= RM20 dan = RM15 danSEE MORE QUESTIONS