Anita is the owner of a large storehouse. She owns a robot named Wall-E. She wants to program Wall-E to discard all the items in the storehouse as per the following criteria a. An item manufactured before 2010 or b. An item weighing more than 20 Kg but less than 40 Kg or c. An item weighing more than 40 Kg and costs less than 1000 rupees. write in c progrmm
Q: Your completed program should: 1. Prompt the user and read in the number of a team playing the…
A: Your completed program should: 1. Prompt the user and read in the number of a team playing the…
Q: Write a program that computes the tax and tip on a restauran t bill for a patron with a$44.50 meal…
A: #include <stdio.h> int main(){ float meal=44.50,tax,tip,total; tax=(meal/100)*6.75;…
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: You were hired by PAGCOR as part of programming team in-charge of automating its BINGO game. Your…
A: Step 1: Accept Number n form user Step 2: if Number between 1 to 15 the print "That's Letter 'B' in…
Q: The steelwork.py program, given below, creates three types of steel objects. Carbon steel (Steel) is…
A: Actually, python is a easiest programming language. It has a concise(less) code. It is a dynamically…
Q: Q2: Write a FORTRAN90 program that reads a student ID and his GPA out of 4.0. The program should…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number…
A: C# is a general purpose multi-paradigm programming language developed and used by Microsoft. It…
Q: write a program named MarshallsRevenue that prompts a user for the number of interior and exterior…
A: The below given C# program will obey the following rubrics: In the main () method, declaring all…
Q: I'm stuck on this problem, and here's what I'm stumped on: Meadowdale Dairy Farm sells organic brown…
A: The Answer is
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: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: Given: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both…
Q: in python Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon…
A: Below is the required python program: - Approach: - Defining the method driving_cost with…
Q: The owners of the Annan Supermarket would like to have a program that computes the weekly gross pay…
A: Define the class Employee with data members as pay rate for hour, hours worked, first name and last…
Q: PRG11: Write a program that will calculate and show bills of the Manila Electric Company. The rates…
A: #include<stdio.h>int main(){ int subId, consumption; float bill; char name[40],type;…
Q: An electricity company charges their consumers according to the units consumed per month according…
A: ALGORITHM:- 1. Take input for the number of units consumed by the user. 2. Calculate the charge of…
Q: You are writing a program for a scientific organization that is trying to determine the coefficient…
A: Q: Code the given problem
Q: Use your previous working Java program as a starting point (Project 3). Create another function that…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: A corporation named XYZ needs a program to calculate how much to pay their part-time and full-time…
A: The program code is : - for XYZ company : class Employee: def…
Q: Donald Trump has been so stressed lately that he wanted to squeeze a stress ball. As he squeezed a…
A: You have not mentioned any language. According to BartleBy Policy I can answer this question in Any…
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: PROGRAM: #Defining the function deriving_cost def driving_cost(driven_miles, miles_per_gallon,…
Q: Write the Python program that finds the total fuel cost of the vehicle according to the amount of…
A: Python Program a = float(input("Fuel consumption per km (lt) "))b = float(input("Price of 1 liter of…
Q: The force of gravity is different for each planet of the nine planets in our solar system. For…
A: Program Code: #include<iostream>using namespace std;main(){ float weight,n_weight; char ch;…
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: Write a program that helps a company manage salaries of its employees. Your program should ask for…
A: EXPLANATION - A program is created . On program three variables are declared one for hours worked…
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: You are to design and create a program that takes in a price from the user (as a decimal without a…
A: Program Code: import java.util.Scanner;import java.text.DecimalFormat;public class register {…
Q: In this assignment, you are going to complete a program that compute gross and net payment based on…
A: code in java : ======================================================== import java.util.*;import…
Q: Problem 7: Guess the price of the car!? You will implement a variant of the number guessing game we…
A: Python used to answer this question
Q: 2. Write a program that determines a student's grade. The program will read three scores and…
A: Below is the required C++ program: - Approach: - Import the header file and include the namespace.…
Q: How do i solve this problem in python? ( has 3 steps)
A: NOTE:The given information is incomplete (Formula to calculate the minutes to walk or run for a…
Q: Lets write a simple tax program that allows the profit payer and the tax program at the specified…
A: Use if else ladder and assign the tax with respective value based on above ranges
Q: Problem: you are required to write a Java program that will prompt for and read 3 integer values…
A: import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner…
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: The given program in python is as below: OUTPUT OF THE PROGRAM:
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: Lets see the solution.
Q: You need to write a program that analyses the savings of a child who wants to buy a bike. Your…
A: The code is given below.
Q: 8. Write a program that will compute delivery charges based on weight Weight Up to 100 lb Charge per…
A: A program is as follows, Code: %Get the input from the user weight=input('Please enter weight of…
Q: You have started working at a water plant and have been asked to develop a program which, can…
A: C++ program to calculate the water consumption bill for the user. Prompt the user to enter the…
Q: Write a program that calculates a weekly wage, based on an hourly payrate and how many hours were…
A: Answer:
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: 1. As per our guidelines we are supposed to answer only one question. Kindly repost the remaining…
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: Answer :
Q: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: Here I have created the function named driving_cost(). In this function, I have divided the miles by…
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: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: As per the given question, driving_cost() function needs to be designed. Input parameters :…
Q: Write a program that computes the number of extraterrestrial civilizations capable of communicating…
A: Note :- You have not mention the language of the program so. i'm answering your question in C++…
Q: Write a program that reads the following information and prints payroll statements. These are the…
A: <?php //getting full name from user $fullname = readline('Enter fullname : ');…
Q: The New Telephone Company has the following rate structure for long-distance calls: The regular…
A: Solution:
Q: Q2. Write a program that reports the contents of a compressed-gas cylinder based on the first letter…
A: C program
Q: Given an airplane's acceleration and take-off speed v, you can compute the minimum runway length…
A: The given problem can be solved using simple arithmetic operations in any programming language.…
Q: 3. A fast food restaurant sells the following products: Product Burgersteak Softdrinks Price PhP…
A: I have given C++ code to count the total amount paid by customer to by products.
Q: the electrical resistance r (in ohms) of a metal wire is given by the formula r = (ml)/ a where m is…
A: As no programming language is mentioned it is solved using basic C++
Anita is the owner of a large storehouse. She owns a robot named Wall-E. She wants to
program Wall-E to discard all the items in the storehouse as per the following criteria
a. An item manufactured before 2010
or
b. An item weighing more than 20 Kg but less than 40 Kg
or
c. An item weighing more than 40 Kg and costs less than 1000 rupees.
write in c progrmm
Step by step
Solved in 2 steps with 1 images
- We have recently walked through a simple if statement block that results to a value based on the input given. The script is shown again in Snippet 3.11: python3_year = 2008year = int(input('When was Python3 first released?')) if year == python3_year: print('That is correct.')elif year > python3_year: print('Incorrect, too late.')elif year < python3_year: print('Incorrect, too early.')print('Have a great day!') Snippet 3.11 Modify this block as follows: • The user prompt should be Return TRUE or FALSE: Python3 was released in 2008:. • If the user inputs TRUE, print out Correct. • If the user inputs FALSE, print out Incorrect. • Any other user input should result in Please answer TRUE or FALSE. Go to your main.py file and add your code to it. Then, run it in a terminal. The output should look like Snippet 3.12: python3 main.py Return TRUE or FALSE: Python3 was released in 2008: TRUE CorrectHave a great day! python3 main.py Return TRUE or FALSE: Python3 was released in…Suppose you can buy chocolate bars from a vending machine for $1 each.Inside every chocolate bar is a coupon. You can redeem 7 coupons for 1chocolate bar from the machine.For example, if you have $20, you can initially buy 20 chocolate bars.This gives you 20 coupons. You can redeem 14 coupons for 2 additionalchocolate bars. These 2 chocolate bars have 2 more coupons, so you now have atotal of 8 coupons. This gives you enough to redeem for 1 final chocolate bar.Write a recursive function that would accept the amount of dollars andcoupons as its parameters and output the total number of chocolate bars thatcan be bought (including those redeemed via coupons).Write a test program in C++that would allow the user to enter amount of dollarsand then use the recursive function to compute the number of chocolate barsthe user can buy, and output the number to the screen.Consider the case of a shop that sells CDs in cash. The CDs are of three types: Movie CDs, Software CDs and Music CDs. For each of the following CD types, the required attributes are:Movie CD: Movie Title, Year of Release, Lead Actor Name, CD price and CD quantitySoftware CD: Software Name, Edition, Year of Release, CD price and CD quantityMusic CD: Album Title, Year of Release, Number of Songs, Format, CD price and CD quantity. Write a java statement to declare a list (you may follow any) of type CD and instantiate usingHashSet to avoid duplicate entries. Does detecting the same entry requires any method overriding? Apply sorting on the year of release.
- public setUpTrip(double, double): void Car's state is set to hold the speed of travel and distance to travel at that speed Precondition: none Postcondition: Car's state holds information on distance to travel and speed to travel Parameters: Average Speed to be driven, Distance to drive Develop and use an algorithm that calculates the amount of fuel used and the actual distance driven in the drive() method. The algorithm must use a formula that gives proportionately poorer mileage when the Car is driven faster or slower than its optimal speed. When a new Car object is instantiated, it is initialized with an optimal speed variable. Your fuel usage algorithm should set limits on how poor of MPG your car will get. You may add other methods and fields as needed. When a new Car object is created, the car’s odometer is set to a random number between 0.0 and 5.99, the car’s trip odometer is set to 0.0, its best fuel economy (MPG) is set to a random number between 15.0 and 54.99, its…(This is how the output should come and please answer it as soon as possible) Output: 1.==================================== Hogwart's Dragons is a Quidditch team. Number of players in Hogwart's Dragons is 2 The Players are: Seeker: Player name: Harry Potter, House: Gryffindor Chaser: Player name: Katie Bell, House: Gryffindor 2.==================================== We do not have enough players to form a squad. 3.==================================== 4.==================================== Hogwart's Dragons is a Quidditch team. Number of players in Hogwart's Dragons is 4 The Players are: Seeker: Player name: Harry Potter, House: Gryffindor Chaser: Player name: Katie Bell, House: Gryffindor Beater: Player name: Vincent Crabbe, House: Slytherin Keeper: Player name: Miles Bletchley, House: Slytherin 5.==================================== We do not have enough players to form a squad. 6.==================================== We have enough players to form a squad. But we cannot form a perfect…Through this programming assignment, the students will learn to do the following: Learn to work with command line options and arguments Gain more experience with Makefiles Gain more experience with Unix Learn to use some of the available math funtions available with C Usage: mortgagepmt [-s] -r rate [-d downpayment] price In this assignment, you are asked to do a mortgage payment calculation. All information needed for this will be passed to the program on the command line. There will be no user input during the execution of the program. You will need a few pieces of information. The price of the home and the amount of the down payment. You will also need to know the interest rate and the term of the mortgage. To figure your mortgage payment, start by converting your annual interest rate to a monthly interest rate by dividing by 12. Next, add 1 to the monthly rate. Third, multiply the number of years in the term of the mortgage by 12 to calculate the number of monthly payments you’ll…
- I'm currently trying to create a game of Craps, and I am trying to display the message "Sorry. You busted!" after the user's balance goes to 0 in that round if they lose, and this is in C#. A part of the code is listed below in which where I believe this line can be entered (if you can't do C#, please reject my question). if (gameStatus == Status.Won) { Console.WriteLine("Wow! You win."); balance = balance + wager; Console.WriteLine("Current Balance => " + balance); } else { Console.WriteLine("Oh! You lose."); balance = balance - wager; Console.WriteLine("Current Balance => " + balance); wager = Convert.ToInt32(Console.ReadLine()); if (balance <= 0 || wager == 0) { Console.WriteLine("Sorry. You busted!"); break;…Let's modify the program from this section so that the user can supply the interest rate. For very small interest rates, it may take a very long time for the balance to double. Assume the user can't wait for more than twenty years. Stop adding interest when the balance has doubled or twenty years have elapsed. 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 finaldoubleTARGET=2*INITIAL_BALANCE; doublebalance=INITIAL_BALANCE; intyear=0; Scannerin=newScanner(System.in); System.out.print("Interest rate in percent: "); doublerate=in.nextDouble(); // TODO: Count the years required for the investment to double // but no more than 20 years /* Your code goes here */ System.out.println("Year: "+year); System.out.printf("Balance: %.2f%n", balance); }i have this c code its a bouncing ball game and it has a paddle to make the ball bounce back but it is not working. how to fix it? #include <stdio.h>#include <stdlib.h>#include <time.h> // Define constants for the screen size and ball velocity.#define SCREEN_WIDTH 60#define SCREEN_HEIGHT 20#define BALL_VELOCITY 1#define CENTER // Variables to keep track of position and speed of ballint x = 0;int y = 100;int x_speed = 5;int y_speed = 5;// Variables to keep track of paddleint x_paddle = 250, y_paddle = 370;int paddle_width_half = 40;// score keepingint score = 0;int width;int key;int LEFT;int RIGHT;int keyPressed;int keyCode; // Called every re-draw, defaul 30 times per secondvoid draw() { // Update position by adding speedx = x + x_speed;y = y + y_speed;if (y < 0)y_speed = -y_speed;if (x > width || x < 0)x_speed = -x_speed; // Check if keys are pressedif (keyPressed) {if (keyCode == RIGHT || key == 'd') {// Move paddle rightx_paddle = x_paddle + 8;}else if…
- java Which of the following examples is an example of implicit type conversion? int x = 5;int i = 0;double y = 3.75;double z = 0.0;Select one or more options: a.z = x * y; b.z = 5 * y; c.i = x / 5; d.z = (double) x * y; e.i = x * (int) z;Write a program that will accept the following inputs from the user: Company ID, number of foreign workers, number of local workers, number of part time workers, daily rate and tax incentive. Your program should compute the following: Total number of workers= (number of foreign workers + number of local workers + number of part time workers) Total salary = (Total number of workers * daily rate) – (tax incentive) Display Company ID, Total number of worker, Total salary.Java - Programming Develop a letter-guessing game in this assignment.Requirements:1). When the game begins, generate a random letter between A and Z;2). Display a message "I have a secret letter (A to Z), can you guess what it is?";3). Read the user's answer;4). Compare the user's answer and the random secret letter generated;5). If the user answer is before the random secret letter in the alphabet, display "Incorrect. Trysomething later in the alphabet" and go to Step 2;6). If the user answer is after the random secret letter in the alphabet, display "Incorrect. Trysomething earlier in the alphabet." and go to Step 2;7). If the user answer is the same as the random secret letter, display "Well done. Want to playagain (y/n)?";8). Read the user's answer. If the answer is 'y', go to Step 1. If the answer is 'n', go to Step 9;9). Display "Thanks for playing the game. Goodbye!". The program stops.Run your program several times. Take screenshots. Submit your Java file with the screenshots