A company wants a program that will calculate the weekly paycheck for an employee based on how many hours they worked. For this company, an employee earns $20 an hour for the first 40 hours that they work. The employee earns overtime, $30 an hour, for each hour they work above 40 hours. Example: If an employee works 60 hours in a week, they would earn $20/hr for the first 40 hours. Then they would earn $30/hr for the 20 hours they worked overtime. Therefore, they earned: ($20/hr * 40hrs) + ($30/hr * 20 hrs) = $800 + $600 = $1400 total.
Q: Let's begin with a lesson in roulette. Roulette is a casino game that involves spinning a ball on a…
A: Given The answer is given below.
Q: Write a program to grade students based on scores out of 100 and also print a teacher comment. If…
A: I give the code in Python along with output and code screenshot
Q: Write a program that plays a guessing game with the user. The user should pick a letter, and the…
A: GIVEN: Write a program that plays a guessing game with the user. The user should pick a letter, and…
Q: Write a program that computes the cost of the postage on first-class mail according to the following…
A: Algorithm for calculating the cost of the delivery of the mail:Step1: Declare…
Q: Write a program that calculates and prints the bill for a cellular telephone company, on the type of…
A: Actually, program is a executable software that runs on a computer.
Q: Write a program with total change amount in pennies as an integer input, and output the change using…
A: First, figure out how we want to represent the data on the computer: Data Representation: Represent…
Q: Imagine that you are managing a plant, and measure production each day. Production is in number of…
A: prod = 1list=[]day=1#taking input and appending in listwhile prod > 0: prod=int(input("Please…
Q: Write a program that calculates the potential energy of 3 charges q1 = 1, q2 = 2, q3 = 3 located at…
A: For the given points (1, 2, 3), (3, -4, -5) and (-4, 2, -6) The rij is the distance between charges…
Q: Write a program that will check and print if the person is a regular passenger, student or senior…
A: Program Code: #include<stdio.h>#include<conio.h>main(){ int ch,fare; printf("If you are…
Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…
A: Program algorithm- STARTStep 1: Import the essential headers.Step 2: Define the main function.Step…
Q: Write a program to find the equivalent series and parallel resistance for 3 resistor values. Your…
A: As there is no programming language mentioned in question . program is attempted in c language user…
Q: Write a program to take orders for a computer shop and print a bill. Your program asks for the…
A: **THIS CODE IS WRITTEN IN PYTHON SINCE NO PROGRAMMING LANGUAGE WAS MENTIONED. #input values item…
Q: Suppose that the first number of a sequence is x, where x is an integer. Define a0= x; an+1=an/2 if…
A: Following is the C++ program that takes as input from user the value of x. Then using the while loop…
Q: Write a program that calculates the electricity bill. The rates of electricity per unit are as…
A: Introduction of program In this program, we will give input on Electricity Unit Consumed. Charges…
Q: Java, a real estate office handles 50 apartment units. When rent is $600 per month, all the units…
A: Actually, java is a object oriented programming language.
Q: What is the probability that in a classroom of x people, at least 2 will be born on the same day of…
A: Given data, What is the probability that in a classroom of x people, at least 2 will be born on the…
Q: Write a program to calculate total ordering cost. Jacob is a retailer for ice. Normally a bag of ice…
A: I give the code in python(because you have not mentioned any particular language) and also provide…
Q: This program will have 4 states: HAPPY, HUNGRY, BORED, SAD. Here are the rules. Our animal starts…
A: Please refer to the following steps for the complete solution to the problem above.
Q: Write a program that implements a tip calculator. Your program should ask the user for the bill…
A: Here no language is mentioned, so i have provided python code for given question.
Q: а. Write a program that calculates and prints the fare for an airline. There are two plans: Plan…
A: Code: #include <cctype> #include <iostream> #include <cstring> #include…
Q: Write a program that simulates the proverbial game of Russian Roulette. The program will prompt the…
A: Given: Write a program that simulates the proverbial game of Russian Roulette. Theprogram will…
Q: Write a program that receives a number from a user and checks if it's float or integer. In case of…
A: First we declare the number variable, which gets input from the user. Also, we declare a variable…
Q: Write a program that will figure out the required change for a purchase. Start by asking the user…
A: Introduction of the Program: The Java Program takes the cost of the product and amount paid from the…
Q: Write a program called p3.py that prints out a classic hangman stick figure. The program should ask…
A: We need to create the program according to the given output for the hangman in python.
Q: Write a program that reads HAND_SIZE cards from the user, then analyzes the cards and prints out the…
A: Given: Write a program that reads HAND_SIZE cards from the user, then analyzes the cards and…
Q: Write a program that calculates and prints the bill for a cellular telephone company. The company…
A: C++ Code: #include <iostream>#include <iomanip> using namespace std;int main(){ int…
Q: a program that plays a game with a single die (or dice). Each number on the die is worth a certain…
A: It is defined as Dice (singular die or dice[1]) are small, throwable objects with marked sides that…
Q: Write a program that simulates flipping a coin to make decisions. The input is how many decisions…
A: According to the information given:- We have to preform flipping a coin to make decisions. take…
Q: Write a program that simulates the proverbial game of Russian Roulette. The program will prompt the…
A: first, take the input for the bad number and the number of players in the game then loop over these…
Q: Write a program that asks a user to input the height of triangle and draw a triangle that has the…
A: I give the code in Java along with output and code screenshot
Q: Imagine you are working for a lumber company, and your employer would like a program that calculates…
A: The company sells pine, fir, cedar, maple, and oak lumber. The lumber is priced by board feet. One…
Q: Write a program that simulates the proverbial game of Russian Roulette. The program will prompt the…
A: Code: #include <iostream>#include <cstdlib>#include <ctime>#define MAX 50using…
Q: You are required to develop a program that calculates the overtime pay of the staff in ABC Company.…
A: We have to calculate total wage and based on hours worked and wage per hour We can implement this…
Q: :Write a program that will calculate your electric bill. You are to input the number of ki burs…
A: Below is the implemented code in c++
Q: Write a program that allows you to play rock,paper, scissors against the computer. When first run…
A: #include <iostream>#include <stdio.h>#include <stdlib.h>#include <ctime>…
Q: There are n players, and counting always starts with the folded hands of player 1. For instance, in…
A: Java Program: // Importing required modules import java.util.Scanner; import java.util.LinkedList;…
Q: Write a c++ program for a bank in your town that updates its customers’ accounts at the end of each…
A: Objective: This program implements the Bank account problem in which the user inserts values for his…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the computer. The…
A: Note: Below is the required program in the java language. Program Approach: Importing necessary…
Q: Write a program that lets the user play the game of Rock, Paper, Scissors against the com- puter.…
A: import java.util.Random;import java.util.Scanner; public class Main { public static int…
Q: Write a program that computes the cost of postage on a first-class letter according to the following…
A: Use an if-else block to find the cost of postage and then another if-else block to check for special…
Q: Write a program which handles a credit card operation. For simplicity, assume that there are only…
A: This is a program which requires the use of arrays. The program illustrates how to use DECLARE, GET…
Q: Write a program that will read a number and will display the factors of the number. Factors are…
A: Program code: x=int(input("Enter a number: "))print("The factors of",x,"are:")for i in range(1, x +…
Q: Write a program that helps the user count his change. The program should ask how many quarters the…
A: Java program is asked for the given requirements.
Q: Let's begin with a lesson in roulette. Roulette is a casino game that involves spinning a ball on a…
A: Answer: 1. What is the expected value of a bet on a single number if we bet $1? If we bet $1 on a…
Q: Write a program in C language to simulate tossing a “fair” coin. Allow the user to enter the number…
A: Write a program using c language that will take a number of tosses as input and find the number of…
Q: Write a program that outputs all the integers between 100 and 1000 (inclusive), that are divisible…
A: Approach: create a class inside main method iterate the for loop to check for condition for number…
Q: What is the probability that in a classroom of x people, at least 2 will be born on the same day of…
A: Problem: Probability of having atleast 2 people birthday on the same day through simulating 10000…
Q: The Research team led by Bernadette Wolowitz at Cal-tech University has discovered a new Amoeba that…
A: Explanation: Include all the necessary header files. Declare the necessary variables. Take the user…
A company wants a
Example: If an employee works 60 hours in a week, they would earn $20/hr for the first 40 hours. Then they would earn $30/hr for the 20 hours they worked overtime. Therefore, they earned: ($20/hr * 40hrs) + ($30/hr * 20 hrs) = $800 + $600 = $1400 total.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)Suppose 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.Write a program that plays a game with a single die (or dice). Each number on the die is worth a certain number of points. If the person rolls a six, then that roll is worth 4 points. If the person rolls a five, then that roll is worth 3 points. If the person rolls a three, then that roll is worth 2 points. All the other rolls (four, two or one), that roll is worth 1 point. The rules of the game is that the player rolls the die five times, and adds them up. If the total adds up to a number greater than or equal to 15, then the player gets a rating of excellent. If the total adds up to a number greater than or equal to 12 but less than 15, then the player gets a rating of above average. If the total adds up to a number greater than or equal to 7 but less than 12, then the player gets a rating of good. If the total adds up to a number less than 7, then the player gets a rating of poor. After the game is over, the program should ask the user if they want to play again. In…
- Suppose 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% (totalsales < 200) Greater or equal to 200 sold 10% (totalsales >=200 & totalsales <400) Greater than to 400 sold 12% (if (totalsales >= 400) Use Multiway if, else if (use as many you need) and else correctly Review slides 3-CH-2 Slide 4 and 8 Write the code correctly as show in the chapter slides. Pay attention to the commission chart above: (3) input as examples shown 500, 250, 150 You can work with your team and submit your code and output in PDF. 1. Provide the user the commission rate list…Imagine you are working for a lumber company, and your employer would like a program that calculates the cost of lumber for a customer order. The company sells pine, fir, cedar, maple, and oak lumber. The lumber is priced by board feet. One board foot equals one square foot that is one inch thick. The price per board foot is given in the following table: Pine 0.89 Fir 1.09 Cedar 2.26 Maple 4.50 Oak 3.10 The lumber is sold in different dimensions (specified in inches of width and height, and feet of length) that need to be converted to board feet. For example, a 2 x 4 x 8 piece is 2 inches wide, 4 inches high, and 8 feet long, and is equivalent to 5.333 board feet (2 * 4 * 8 = 64, which when divided by 12 = 5.333 board feet). Create a blank c++ Give the customer instructions and then ask the user (customer) to identify the items they wish to purchase by inputting the type of wood, the length, width, & heights of the board, and the number of boards they desire. Allow the user to…Write a program that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get 21 or as close to 21 without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is declared. Otherwise,…
- Python programming In a department store sale, customers who purchase over 2000 are given 10% discount. Write a program that will accept for the purchase amount of a customer, solve for his/her discount if there’s any, ask for the money he/she is going to pay, then output the discounted price and the change of the customer.”Write a program that computes how much a customer has to pay after purchasing two items. Make the lower-priced item half price. If the two items have identical prices, you can make one or the other half price. The price is calculated according to the following rules:• Buy one get one half off promotion: the lower price item is half price.• If the customer is club card member, additional 10% off.• Tax is added. Inputs to the program include:• Two items’ prices• Have club card or not (User enters ‘Y’ or ‘y’ for “yes”; ‘N’ or ‘n’ for “no”)• Tax rate (User enters the percentage as a number; for example, they enter8.25 if the tax rate is 8.25%) Program displays:• Base price - the price before the discounts and taxes• Price after discounts - the price after the buy one get one half off promotionand the member’s discount, if applicable• Total price – the amount of money the customer has to pay (after tax)printed with the precision of 2 decimal digits. Hint: In order to print a number in a…Write a program that plays a dice game called "21" It is a variation on BlackJack where one player plays against the computer trying to get 21 or as close to 21 without going over. Here are the rules of the game: You will play with dice that have numbers from 1 to 11. To win, the player or the computer has to get to 21, or as close as possible without going over. If the player or computer goes over 21, they instantly lose. If there is a tie, the computer wins. Starting the game: The player is asked to give the computer a name. For now, we'll simply call the computer opponent, "computer." The game starts with rolling four dice. The first two dice are for the player. These two dice are added up and the total outputted to the screen. The other two dice are for the computer. Likewise, their total is outputted to the screen. Player: If a total of 21 has been reached by either the player or the computer, the game instantly stops and the winner is declared. Otherwise,…
- Write a program to calculate total ordering cost. Jacob is a retailer for ice. Normally a bag of ice costs $2.5, but the price varies with the amount that he purchases. The following table shows the discount that Jacob receives. Order Volume Discount Rate >= 200 bags 25% off 120 - 199 bags 20% off 60 - 119 bags 15% off 40 -59 bags 10% off 20 – 39 bags 5.5% off 0-19 bags No discount (1) Inyourprogram,definevariableswithmeaningfulnamestoacceptuserinputonordervolume, and calculate total ordering cost based on the order volume inputted. Use if-else statements to handle the calculations for different order volumes as shown in the above table. (2) Yourprogramshouldprintoutuserordervolume,discountrate,andtotalorderingcostinconsole (similar to the following sample outputs)Using Paython Write a program that asks a student for his grade (out of 100) in 3 exams and then print out his final grade (out of 100), given that the weight of the first exam is 30%, the second 30%, and the third 40%.Example Input:Exam1: 70Exam2: 80Exam3: 90Example Output:Total Grade = 81Explanation: 0.3 * 70 + 0.3 * 80 + 0.4 * 90 = 81The New Telephone Company has the following rate structure for long-distance calls: The regular rate for a call is P8 per minute. Any call started after 6:00P.M. (1800 hours) but before 8:00 A.M (0800 hours) is discounted 50%. Any call longer than 60 minutes receives a 15% discount. All calls are subject to 4% federal tax on the cost after any discounts. Write a program that takes the start time for a call based on a 24-hour clock and the length of the call in minutes. The gross cost (before any discounts or tax) should be displayed followed by the net cost (after discounts are deducted and tax is added).