Program #1: In one state, single residents are subject to the following income tax: Income Not over $750 $750-$2500 $2500-$5000 $5000-$8000 Over $8000 Amount of tax 1% of income $7.5 plus 2% of amount over $750 $82.5 plus 4% of amount over $2500 plus 5% of amount over $5000 plus%6 of amount over $8000 $142.50 $230.00 Write a program named IncomeTax.java.|| 1. generate random number of people in the range of (1-15); 2. ask the user to enter the amount of taxable income for each person, and then displays the tax due; 3. display the people with max value of taxes on the screen.
Q: *Walmart: Hourly pay at 45 dollars per hour. They only work 30 weeks out of the year and work 80…
A: Python used to answer this question
Q: A small code that returns the average earning of all employees
A: In the program, a function named average is created to return the average earning of all employees.…
Q: Write a multiple assignment statement that can be used instead of the followinggroup of assignment…
A: GIVEN: Write a multiple assignment statement that can be used instead of the followinggroup of…
Q: Write function avg_highest that takes 3 floating values called x, y and z as parameters abs returns…
A: #function to return average of two most large numbers def avg_highest(x, y, z): sum = 0 # if…
Q: Assume a function F1 is defined with the heading: int F1(int a, double &b, double t[]); Assume…
A: function heading int F1(int a, double &b, double t[]); and variables defined are : int a1:…
Q: Write a program to which inputs the response for each student and which computes / outputs the…
A: Here, in the above question we are asked to calculate the percentage of students who walk to campus,…
Q: The cost to become a member of a fitness center is as follows: (a) the senior citizens discount is…
A: Program: //include the required header files #include <iostream> #include <string>…
Q: A particular talent competition has 5 judges, each of whom awards as score between 0 and 10 to each…
A: def getJudgeData(): var = -1 while 1: var = int(input()) if(var>=0 and…
Q: Write a function called zero_smaller(int &, int &) that is passed two int arguments by reference and…
A: Since you are not mentioning the programming language, here we are using C++ to complete the…
Q: Q3. A power distribution company charges its consumers depending on the type of customer: 1- Class A…
A: C program to calculate the total payable amount by a customer on the power consumption. There are…
Q: HOMEWORK 6: The tank in a water tower has the geometry shown in the figure below (the lower part is…
A: Attached image 01:
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: In 2022 population of town A is less than population of town B. However, the population of town A…
A: Use a for loop which can iterate for 50 times but we can exit when population of A exceeds…
Q: Using “c” above, write a program that requests two fertilizer name and their respective yields. Your…
A: - The question is to input two fertiliser and their yield and print the fertiliser with biggest…
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: 10 - In an examination, 500 students appeared. Out of these students, 38 % got A+ grade, 45 % got B+…
A: Program to find the number of students who got A+, B+ and the number of students who just passed.
Q: b. Write PHP Program to assign grades to students based on the following criteria; Grade "A" if…
A: Below is the code and sample outputs:
Q: 1. You are working for the census bureau and you need to write a program to count the number of…
A: Note: We are authorized to answer two questions at a time. Since you have asked more than one…
Q: c++ program or code of Juan works on a field and for his work he receives 1/3 of the crop. If his…
A: #include<iostream>using namespace std; int main(){ float share_of_juan = 245; float part…
Q: The cost to become a member of a fitness center is as follows: (a) the senior citizens discount is…
A: Program code: //include the required header files #include <iostream> #include <string>…
Q: Introduction: Assignment requires function creation and using string methods. Instructions: The…
A: Program code: #Pseudo code: #0.Start #1.Enter the number to be converted as n #2.travers through the…
Q: 1. Write a program that accepts from the user a weight of an object in kilograms. The program should…
A: START DECLARE weight, metricTon, milligram, gram INPUT weight ASSIGN metricTon = weight / 1000…
Q: Write a function NumberOfPennies() that returns the total number of pennies given a number of…
A: I give the code in Cpp along with output and code screenshot
Q: C++ Programming The Card Game One day, Fred and his N friends were playing a card game in which each…
A: Algorithm: 1. First calculate the total sum of the input array as total_sum and store it. 2. Iterate…
Q: Q 1) Find the error and also run the program and show the output of the given program. /******** A…
A: given code: task: to find the error, run and provide output
Q: Write a C program to which inputs the response for each student and which computes / outputs the…
A: Using for loop we can take input of 25 values and then calculate percentage by dividing total count…
Q: the output of this program is 6 void main (){int a,b,c;a=1,b%3D5;c%3Da+b;cout <<a<<b<<endl; true O…
A: 1. FALSE 2. FALSE
Q: Problem 5. Electric Bill: Write a program that will calculate an- show bills of the Manila Electric…
A: C code to calculate electricity consumed as per the above data .
Q: Write a C++ full program that calculates the average score of each student as well as the grade for…
A: Hello student, hope you are doing good. The c++ code of the given question is attached below.
Q: A company named ABC hired three employees in different years; each employee gets an increment of…
A: Program approach:- Using the necessary header file. Structure to store employee data. Char array to…
Q: 1. The function get Thousands () should return the thousands digit of the number; e.g., 1=get…
A: The function for the about given program is given below:
Q: C# Programming The Card Game One day, Fred and his N friends were playing a card game in which each…
A: Required: We have to write a code to maximize the sum which we get on the front cards, keeping in…
Q: Python problem Problem statement Write a program that prints all the prime factors of a number,…
A: import math def primeFactors(n): # Print the number of two's that divide n while n %…
Q: Using C++ Program, please help me code this problem. The utilities commission has decided that the…
A: Start : 1)First read the units consumed by customer in a month from user 2)Then calculate the total…
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: Driving is expensive. Write a program with a car's miles/gallon and gas dollars/gallon (both floats)…
A: Step 1 The code is given in the below step
Q: C# Programming The Card Game One day, Fred and his N friends were playing a card game in which each…
A: Given:
Q: Suppose you shop for rice in two different packages. You would like to write a program of C++ to…
A: The price per unit weight can be calculated by dividing the total package price by total weight and…
Q: You hired three programmers and you (hopefully) pay them. Create a function that takes three numbers…
A: Please find the answer below :
Q: Write a program that simulates rolling two twenty-sided dice 100000 times, counting now many times…
A: Below a program that simulates rolling two twenty-sided dice 100000 times, counting now many times…
Q: PROGRAM DESCRIPTION Make a program that accept employee number, employee name, job code (A/B/C) and…
A: First, we will input the name, job code, number, and hours worked. Based on Job code and hours…
Q: Problem 2. An electricity board charges the following rates mentioned in the table for the use of…
A: As per the given question, we need to calculate the monthly bill of a user based on the selected…
Q: Here is the what im writing: The error starts at the second line. Im using Spyder/anaconda to write…
A: You need to write python function. Function name should be "getBonus". This function will accept 2…
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: Task 2: The formula for the area, A, of a triangle with sides of length a, b, and c is A = V[s(s –…
A: - We have to create the program for the are of the triangle problem. - We are using C++ here.
Q: write a void function divisor that receives an integer number and display its divisor on screen…
A: Note: We are authorized to answer one question at a time, since you have not mentioned which…
Q: write a program c++ A General Service company hired you to write a program to compute the total…
A: Given: Assumption: Rate $45.00 per hourComputation: Labour : Rate * hours work Total…
Q: In python ALLENGE ACTIVITY 5.13.2: Default parameters: Calculate splitting a check between diners.…
A: We need to write a split_check function that returns the amount that each diner must pay to cover…
Q: Assume a function F1 is defined with the heading: int F1(int a, double &b, double t] ); Assume the…
A:
please type***
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- 1 - Nuclear Power Plant (python) The nuclear powerplant at Threeyedfish will automatically run a program to print a warning message when the reactor core becomes unstable. The warning message reads: NUCLEAR CORE UNSTABLE!!! Quarantine is in effect. Surrounding hamlets will be evacuated. Anti-radiationsuits and iodine pills are mandatory. Since the message contains crucial information, it should be printed three times. To do this, write a function that prints this message. This function has to be used three times.This program deals with processing the results of a survey which was recently conducted. This survey was intended to determine the percentage of students who walk tocampus, the percentage who drive to campus and the percentage who live in residence on campus.The results of the survey are recorded as follows: WDDL... This data is to be interpreted as follows: the first person surveyed said that he walks – hence W isrecorded, the second person said that he drives – hence D, the third person said that he drives –hence D, and the fourth person said that he lives on campus – hence L. Write a C program to which inputs the response for each student and which computes / outputs therequired percentages. Assume that 25 students were surveyed. Your prompt should have the following format: Do you walk, drive or live on campus. UseW – if you walkD – if you driveL – if you live on campusUse the following data for the execution of your program: W D D L L W D D L L W W D D W L W L L D W L W L DThis program deals with processing the results of a survey which was recently conducted. This survey was intended to determine the percentage of students who walk tocampus, the percentage who drive to campus and the percentage who live in residence on campus.The results of the survey are recorded as follows: WDDL... This data is to be interpreted as follows: the first person surveyed said that he walks – hence W isrecorded, the second person said that he drives – hence D, the third person said that he drives –hence D, and the fourth person said that he lives on campus – hence L. Write a program to which inputs the response for each student and which computes / outputs therequired percentages. Assume that 25 students were surveyed. Your prompt should have the following format: Do you walk, drive or live on campus. UseW – if you walkD – if you driveL – if you live on campusUse the following data for the execution of your program: W D D L L W D D L L W W D D W L W L L D W L W L D
- PROBLEM: I need to make an ATM program that allows the user to check his or her balance after entering his or her correct PIN and the maintaining balance is Php 8000. A message is shown when the balance is below PHP 8,000 for withdrawal and its remaining balance. Another message is shown when the balance is PHP 8,000 and above for deposit and its updated balance. The code: import random import sys class ATM(): def __init__(self, name, account_number, balance = 0): self.name = name self.account_number = account_number self.balance = balance def account_detail(self): print("\n----------ACCOUNT DETAIL----------") print(f"Account Holder: {self.name.upper()}") print(f"Account Number: {self.account_number}") print(f"Available balance: Nu.{self.balance}\n") def deposit(self, amount): self.amount = amount self.balance = self.balance + self.amount print("Current account…A1.2 Bean MachineThe bean machine is a device for statistical experiments. It consists of an upright board with evenly spaced nails (or pegs) in a triangular form,.Balls are dropped from the opening at the top of the board. Every time a ball hits a nail, it has a 50% chance of falling to the left or to the right. The piles of balls are accumulated in the slots at the bottom of the board.Write a program to simulate the bean machine that has 8 slots as shown in the figure. Your program should prompt the user to enter the number of balls to drop. Simulate the falling of each ball by printing its path. For example, the path for the ball in LLRRLLR and the path for the ball in RLRRLRR. Note that there are 7 levels of nails, so your path should be 7 letters (not 8).Create an array called slots. Each element in slots store the number of balls in a slot. Each ball falls into a slot via a path. The number of “R”s in a path is the position of the slot where the ball falls. For example, for the…You are working for a lumber company, and your employer would like a program that calculates the cost of lumber for an order. The company sells pine, fir, cedar, maple, and oak lumber. Lumber is priced by board feet. One board foot equals one square foot that is one inch thick. Theprice per board foot is given in the following table: Pine 0.89Fir 1.09Cedar 2.26Maple 4.50Oak 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). An entry from the user will be in the form of a letter and four integer numbers. The integers are the number of pieces, width, height, and length. The letter will be one of P, F, C, M, O (corresponding to the five kinds of wood) or T, meaning total. When the letter is T, there are no…
- in python “c” represents a crop and “w” represents a water source. Each water source hydrates the eight tiles around it (including itself) Input the number of rows and columns in the crop field:ROWS> 4COLUMNS> 4Input each row of the crop field.ROW0> c c c wROW1> w c c cROW2> c c c cROW3> c w c cNot all crops are watered!OUTPUT FalseThe following crops are not watered:OUTPUT [(2, 3), (3, 3)] Input the number of rows and columns in the crop field:ROWS> 7COLUMNS> 1Input each row of the crop field.ROW0> cROW1> wROW2> cROW3> cROW4> wROW5> cROW6> wAll crops are watered!OUTPUT True10 - In an examination, 500 students appeared. Out of these students, 38 % got A+ grade, 45 % got B+ and the remaining just passed. Assuming that no student failed, find the number of students who got A+, B+ and the number of students who just passed.(Python code)Problem 1. VehiclesWrite a program that models 2 vehicles (Car and Truck) and will be able to simulate driving and refueling them inthe summer. Car and truck both have fuel quantity, fuel consumption in liters per km and can be driven givendistance and refueled with given liters. But in the summer both vehicles use air conditioner and their fuelconsumption per km is increased by 0.9 liters for the car and with 1.6 liters for the truck. Also the truck has a tinyhole in his tank and when it gets refueled it gets only 95% of given fuel. The car has no problems when refueling andadds all given fuel to its tank. If vehicle cannot travel given distance its fuel does not change.Input On the first line - information about the car in format {Car {fuel quantity} {liters per km}} On the second line – info about the truck in format {Truck {fuel quantity} {liters per km}} On third line - number of commands N that will be given on the next N lines On the next N lines – commands in formato Drive…
- Problem 1. VehiclesWrite a program that models 2 vehicles (Car and Truck) and will be able to simulate driving and refueling them inthe summer. Car and truck both have fuel quantity, fuel consumption in liters per km and can be driven givendistance and refueled with given liters. But in the summer both vehicles use air conditioner and their fuelconsumption per km is increased by 0.9 liters for the car and with 1.6 liters for the truck. Also the truck has a tinyhole in his tank and when it gets refueled it gets only 95% of given fuel. The car has no problems when refueling andadds all given fuel to its tank. If vehicle cannot travel given distance its fuel does not change.Input On the first line - information about the car in format {Car {fuel quantity} {liters per km}} On the second line – info about the truck in format {Truck {fuel quantity} {liters per km}} On third line - number of commands N that will be given on the next N lines On the next N lines – commands in formato Drive…Problem 1. VehiclesWrite a program that models 2 vehicles (Car and Truck) and will be able to simulate driving and refueling them inthe summer. Car and truck both have fuel quantity, fuel consumption in liters per km and can be driven givendistance and refueled with given liters. But in the summer both vehicles use air conditioner and their fuelconsumption per km is increased by 0.9 liters for the car and with 1.6 liters for the truck. Also the truck has a tinyhole in his tank and when it gets refueled it gets only 95% of given fuel. The car has no problems when refueling andadds all given fuel to its tank. If vehicle cannot travel given distance its fuel does not change.Input On the first line - information about the car in format {Car {fuel quantity} {liters per km}} On the second line – info about the truck in format {Truck {fuel quantity} {liters per km}} On third line - number of commands N that will be given on the next N lines On the next N lines – commands in formato Drive…Program42.javaIn right triangle ABC below, angle C is 90 degrees, side a = 48 , and side c = 73. Write a Java program that uses class Math to calculate the length of side b and the other two angles (in degrees). Express all measures accurate to two decimal places. See "Help with triangle program" above. Program43.javaHere are some data regarding a retail purchase: item: photo paper dept: A price: $8.99 quantity: 4 taxable: true Assign these data items (without user inputs) to Java variables of the most suitable type as suggested by the values. Then use the variables to calculate and generate the output exactly as shown below. Use only the printf() method. Purple indicates a variable to be displayed using a printf format specifier.Required OutputPurchase: photo paper, quantity 4 @ $8.99Dept A, taxable? trueSubtotal $35.967 % sales tax is $2.52Total payable $38.48