2. Pure Gems Store sells different varieties of gems to its customers. Emerald, Ivory, Jasper, Ruby, Garnet and their prices are 1760, 2119, 1599, 3920, 3999 respectively. Write a Python program to calculate the bill amount to be paid by a customer based on the list of gems and quantity purchased. Any purchase with a total bill amount above on Rs.30000 is entitled for 5% discount. If any gem required by the customer is not available in the store, then consider total bill amount to be -1. Assume that quantity required by the customer for any gem will always be greater than 0. Perform case-sensitive comparison wherever applicable.
Q: Answer properly(editable code , output screenshot) is must Write a C++ program to input…
A: Algorithm: 1.Declare main function 2.Declare variables named no_of_units to take units from the user…
Q: Write the python program that displays the electricity invoice amount according to the first and…
A: first_index = int(input("Enter the first index: ")) # taking 1st index from user…
Q: usiness that uses functions to calculate the weekly payment amounts of employees in a workplace. you…
A: A business that uses functions to calculate the weekly payment amounts of employees in a…
Q: In c++, create a program that gets quarterly sales from a user and calculates the total of all four…
A: Introduction: Here we are required to display the total, average, highest and lowest quarter sales…
Q: In C++: The members of the board of a small university are considering voting for a pay increase for…
A: A C++ program that will prompt for and accept the current salary for each of the faculty members,…
Q: Write a program that reads from a student his/her name and his/her ID which is formed of 8 digits.…
A: The solution to the given problem is below. **Note: As programing language is not mentioned in the…
Q: Write a program that will calculate and print out bills for the city water company. The water rates…
A: Note: Programming language is missing in the question. So we will answer this program in C++. If you…
Q: Here is the expected output for InflationRate Part1: Enter the old and new consumer price…
A: EXPLANATION: The general formula to compute the inflation rate is “((new_cpi -…
Q: 1. Write a c++ programto calculate the parking fare for customerswho park their carsin parking lot…
A: Explanation: type_of_vehicle, hours and minutes are the variables used to store data by user. Then…
Q: The New Telephone Company has the following rate structure for long a. The regular rate for a call…
A: As not mentioned I have solved the question in C++ language Code:…
Q: An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The…
A: Program: // include required header files #include <iostream> #include <iomanip>…
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: C program to calculate and print electricity bill of customer. program code is in step 2. and…
Q: Employees in a company receives net salary after the deductions for tax, Staff Provident Fund (SPF),…
A: Given table and asked to find the netsalary when basic salary is given: Table is given with…
Q: Write a c# program to calculate and print the bill of a given customer. [2] The customer id., name…
A: C# CODE: using System;class HelloWorld { static void Main() { //taking input…
Q: In C++ 1. Write a program that accepts from the user an amount in Peso. It should compute the…
A: Given: The amount entered by the user in Peso. Also, 1 HK dollar = Php 6.51 1 US dollar = Php…
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: #include <stdio.h> int main() { // variable declarations int customer_id, unit_consumed;…
Q: After calculating the ranking score according to the ALES (Academic Postgraduate Exam) score,…
A: Algorithm: Start Read ales score,foreign language score and GPA Calculate…
Q: Problem4: Assume two banks want to establish a secure communication channel so that they can share…
A: Python used to answer this question
Q: Write a program that reads the marks of a student in the test (te), midterm (mid), assignment…
A: Code: #include<stdio.h> int main(){ int tm,mid,assig,fe,pm; printf("Enter…
Q: 5. Write a C program to read sales amount and salary. calculate the bonus amount for employee using…
A: In the given program, the variables salary and sales_amt are used to store the salary and sales…
Q: You are working for a lumber company, and your employer would like a program that calculates the…
A: Objective: This program would compute the total cost of woods of different types where the costs for…
Q: 2:Write a program in C# Sharp to calculate and print the Electricity bill of a given customer. The…
A: Programming instructions: Create required variables. Take input from the user for id , name and…
Q: An ATM contains Indian currency notes of 100,500 and 2000. To withdraw cash from this ATM, the user…
A: As you have not provided the sample output in the question. So, we have provided the output in the…
Q: Federal law requires that hourly employees be paid “time-and-a-half” for work in excess of 40 hours…
A: workingHours=float(input("Enter number of working hours: ")); #input working…
Q: Write a program for the Animal Express delivery company. The company charges by the kilogram for…
A: The python code is shown in the following steps.
Q: 2. Write a program that takes an amount in pesos and breaks it down to bills (1000, 500, 100, 50,…
A: Write a program that takes an amount in pesos and breaks it down to bills (1000, 500, 100, 50, 20)…
Q: In python. Write a program that calculates the BMI (Body Mass Index) of a person, which is used to…
A: #Taking Inputheight = float(input("Enter height in Meters - ")) weight = float(input("Enter weight…
Q: The CAOC Insurance Company working on insurance of vehicles in Oman. They are currently providing…
A: Algorithm: 1. Start 2. Read vehicleLife,vehicleType,vehicleCost 3. Since input() reads data as…
Q: WRITE A PROGRAM TO CALCULATRE THE AREA OF A RECTANGLE OF LENGTH =5 CM AND BREADTH=8CM. CALCULATE THE…
A: Hey, thank you for your question. There are multiple subparts submitted to your question. As per our…
Q: 3. A certain CS professor gives 100-point exams that are graded on the scale 90-100:A, 80–89:B,…
A: Ans: Code: score = int(input("Enter the exam score:"))if score > 90 and score < 100:…
Q: A wholesale furniture store that sells tables in bulk needs a program to help their cashiers. Write…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: Write the reading program: basic salary (bsalary) and sales (sales), then calculate and print the…
A: Here, first you need to declare some variables for all salaries. Then prompt user to enter basic…
Q: Task 11 Write a Python program that takes a number from the user and prints its digits from left to…
A: The programming methodology for the program is given by: Input the number in num variable using…
Q: In C++ language, create a program that gets quarterly sales from a user, and calculates the total of…
A: - We need to code for the sales program.
Q: Write the reading program: basic salary (bsalary) and sales (sales), then calculate and print the…
A: C++ program is given below
Q: Problem 4. Write a program that will accept the tuition fee and compute the total tuition fee based…
A: Accept tution fee as integer and then find the total amount and the convert to integer and display…
Q: Program 2 Omani Electricity Company is the electric energy company. It generates and distributes of…
A: Given:
Q: 1. Get three exam grades from the user and compute the average of the grades. Ou average of the…
A: ALGORITHM Start Declare 3 variables- (grade1, grade2 and grade3) of float type Declare another…
Q: An oil slick occurs when an underwater refinery pipe ruptures, pumping oil into the water. The…
A: Program code: // include required header files #include <iostream> #include <iomanip>…
Q: SHI Hospital provides top-notch medical care with comfortable rooms, The following are the types of…
A: Algorithm: Start Read patient name, room name, no.of days spent n, whether used critical care units…
Q: A business law class of 25 students takes a midterm exam that has 100 true- or-false questions. The…
A: We need four arrays in this problem. The array KOUNT stores the number of times a grade is achieved…
Q: 3. Write a program in C to calculate and print the Electricity bill of a given customer. The…
A: In this user has to enter customer id Name and unit consumed then according to unit find the rm…
Q: Write a program that will read an executive's job number, level number, and basic pay and then…
A: #define CA1 1000#define CA2 750#define CA3 500#define CA4 250#define EA1 500#define EA2 200#define…
Q: The New Telephone Company has the following rate structure for long-distance calls: The regular…
A: Solution:
Q: Write a program to determine the equivalent grade of each student in class as follows: a. Read in…
A: Sample output
Q: Write a program that simulates a coin-tossing game. At the beginning of the game, each of N players…
A: please cheek next steps for code and output
Q: 12. Write an improved version of the futval.py program from Chapter 2. Your program will prompt the…
A: CODE:- 1. Call the main() function. 2. Display the result in the tabular format. 3. Print the…
Q: Q1: write a full python program to process the orders of a restaurant, the order contains the…
A: Step 1: Create a project name. First open Pycharm IDE and then create a “project name” after…
Q: C# Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the…
A: Algorithm: Start Read enter the number of days for a resort stay n If n==1 or n==2,calculate cost…
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- In C++ 1. Write a program that accepts from the user an amount in Peso. It should compute the equivalent amount in HK dollar, US dollar and Canadian dollar. Display the amount in Peso and the equivalent amount in the different currencies. Given: 1 HK dollar = Php 6.51 1 US dollar = Php 50.68 1 Can. Dollar = 40.06In c++, create a program that gets quarterly sales from a user and calculates the total of all four quarters as well as the average, lowest, and highest quarters. Console Example The Quarterly Sales program Enter sales for Q1: 12312.57 Enter sales for Q2: 15293.21 Enter sales for Q3: 14920.95 Enter sales for Q4: 23432.21 Total: 65958.94 Average Quarter: 16489.74 Lowest Quarter: 12312.57 Highest Quarter: 23432.21 Specifications to complete program Create the pseudocode needed to implement the solution above. Convert your pseudocode to C++ code including the following specifications: Round the average quarter to a maximum of 2 decimal digits. Use a vector to store the sales for each quarter. Use STL algorithms to process the data for the quarters.Write C program which should print your name and registration number on the screen then do the following:an industry has launched an online shopping ordering system which sells 5 different products. A list of productnumber, product name and their retail price is given below:Product No. Product Name Retail Price in Rs. Quantity Available101 Soap 60.00 10102 Liquid Hand Wash 200.00 20103 Liquid Dish Wash 150.00 30104 Table cleaner 350.00 40105 Hand Sanitizer 100.00 50 Your program must store this information in an array of struct product type. You must declare the struct product_type. (HINT: You can make any other structures or arrays of structures that you think might help you solve this problem.) Your program should…
- Q 4) Write a c# program to calculate and print the bill of a given customer. [2] The customer id., name and unit consumed by the user should be taken from the keyboard and display the total amount to pay to the customer. The charges are as follow: Unit Charge/unit upto 199 @1.20 200 and above but less than 400 @1.45 400 and above but less than 600 @1.70 600 and above @2.50 If bill exceeds Rs. 400 then a surcharge of 16% will be charged and the minimum bill should be of Rs. 150/=In C++ Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For single people, the standard exemption is $4,000; for married people, the standard exemption is $7,000. A person can also put up to 6% of his or her gross income in a pension plan. The tax rates are as follows: If the taxable income is: Between $0 and $15,000, the tax rate is 15%.Between $15,001 and $40,000, the tax is $2,250 plus 25% of the taxable income over $15,000.Over $40,000, the tax is $8,460 plus 35% of the taxable income over $40,000. Prompt the user to enter the following information:Marital statusIf the marital status is “married,” ask for the number of children under the age of 14Gross salary (If the marital status is “married” and both spouses have income, enter the combined salary.)Percentage of gross income contributed to a pension fund Your program must consist of at least the following functions:Function getData: This function asks the user to enter the…In C++ , Write a program for a Bookstore to take an order from a customer, calculate how much to charge a customer based on his/her order, and display a receipt. The store sells only three books, designated by their authors: Cervantes ($41.25 each), Homer ($15.85 each), and Shakespeare ($30.50 each). Your program is to work as follows: Display a welcome message (e.g., “Welcome to the Bookstore!”) Prompt the user for his/her first name Prompt the user to input the number of books by Cervantes s/he wants Prompt the user to input the number of books by Homer s/he wants Prompt the user to input the number of books by Shakespeare s/he wants Compute the total amount due, including a 10% sales tax Display amount due Ask the user how much money s/he will pay Display a receipt listing the name of the user, the quantity of each item ordered, the total cost of the order, and the amount the user will have left after paying Execution of the compiled program should appear roughly as follows…
- Activity 2 7.) Write a program that will calculate and print out bills for the city water company. The water rates vary depending on whether the water is for home use, commercial use or industrial use. A code of H means home use, a code of c means commercial use and a code of I means industrial use. The water rates are computed as follows: code H: P250.00 plus P0.002 per gallon used code c: P5,000.00 for the first 4 million gallons and P0.002 for each additional gallon. code I: P8,000 if usage does not exceed 4 million gallons, P14,000 if usage is more than 4 million gallons but not more than 10 million gallons and P18000 if usage exceeds 10 million gallons. Your program should prompt the user for the code and the gallons of water used. Your program should echo your input data and should print the amount due from the user. Your program should use a switch statement for the code (char data type). Use the float data type for the gallons. Sample Output in the images:CHALLENGE ACTIVITY 6.7.3: Function with loop: Shampoo. Write a function print_shampoo_instructions() with parameter num_cycles. If num_cycles is less than 1, print "Too few.". If more than 4, print "Too many.". Else, print "N : Lather and rinse." num_cycles times, where N is the cycle number, followed by "Done.". Sample output with input: 2 1 : Lather and rinse. 2 : Lather and rinse. Done. Hint: Define and use a loop variable. Use Python, please.Please code in C++. Write a program that simulates a coin-tossing game. At the beginning of the game, each of N players has a single fair coin and M points. The game performs a sequence of passes until only a minimum number of players remain. In a pass the players toss their coins into the air and when the coins fall to earth, the players count the number of coins that show heads and the number of coins that show tails. If the number of heads exceed the number of tails, then the players who tossed heads increase their points by an integer P and the players who tossed tails decrease their points by the same integer P. The players perform the opposite actions when the number of tails is greater than the number of heads. If the number of heads equals the number of tails, then no player’s points change. If any player’s points fall below one, then the player leaves the game, never to return. The game employs a second integer K to compute P’s value. K’s and P’s initial values are one.…
- In C++, write a program that calculates and prints a monthly paycheck for an employee. The net pay is calculated after taking the following deductions from the employee's gross salary: Federal Income Tax: 17.5% State Tax: 9.1% Social Security Tax: 6.2% Medicare Tax: 1.45% Retirement Plan: 9.29% Health Insurance: $51.48 Life Insurance: $3.71 Your program will prompt the user to input the employee ID, the employee name, and the employee's monthly gross salary. The program will calculate the deductions listed above, along with the percentage of take home pay (defined as the net pay divided by the gross salary). After calculating each deduction and percentage, the output will be printed to the screen (see example output below). Requirements All decimal numbers must be formatted to 2 decimal places. Ask for the employee's ID first, then full name (can include spaces), then the salary. The prompt to enter the salary must include the employee name. The employee ID MUST be…write a program in c++ Assume eight employees working at Ziomind Sdn Bhd (Ismail, Atikah, Ravi, Sumaia, Jonathan, Halimah, Salleh, and Khadijah). The working hours are flexible and every employee might work as low as 1 hour or as much as 9 hours per day for 7 days per week. The company would like to prepare a report that displays the number of working hours for each employee per day, the total working hours per week, and the highest working hours in the week achieved by each employee. Write a program that reads the data recorded by the eight employees that contain the following: A one-dimensional array to store the names of the eight employees and a two-dimensional array of eight rows and seven columns of type double to store the seven-day work hours for each employee. A function named read_data() to read data from the user and display the employee’s names and the seven-day work hours. The employee’s name should be stored in the one-dimensional array of type string. A function…17. Redo Programming Exercise 16 so that the user can also input the cost of producing one liter of milk and the profit on each carton of milk.