An electricity company charges their consumers according to the units consumed per month according to the given traffic: Unit Consumed Charge per unit 200 baisa Up to 100 units More than 100 units and up to 200 units 250 baisa More than 200 units and up to 400 units 300 baisa Morethan 400 units 400 baisa In addition to the above, every consumer has to pay 200 baisa as Service charge per month. Write a Python program named electricity.py that read the units consumed as an input and calculate the total charges payable by the customer. The following is the formula to calculate total charge. Total charge units consumed Charge per Unit + service charge
Q: Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based on the…
A: Given: Write a program that computes the molecular weight of a carbohydrate (ingrams per mole) based…
Q: A customer has to pay for five items. He has only 20.0omr with him. The price of the products are:…
A: Python used to answer this question
Q: Create a program in python wages.py that assumes people are paid double time for hours over 60. They…
A: The required Python code is: import randomimport winsound hourRate=float(input("Enter the hourly…
Q: Write a program which prompts the user for their age. If they are 19 or younger inform them that…
A: Answer to the above question is in step2.
Q: A clothing store added a promotion which give 20% discount on t-shits if the total cost of purchased…
A: CODE:- price = 150quantity = int(input('How many shirts you want to purchase = '))amount = price *…
Q: Write a program to display fruit sales receipts. Python language only Apple: Pink Lady -…
A: type1 = input("Which kind of apples would you like: (P)ink Lady 4.99/kilo (F)uji 5.99/kilo: ")qt1 =…
Q: python Write a program with total change amount as an integer input, and output the change using…
A: Step 1: Accept Amount Step 2: Convert dollar to cents Step 3: Convert dollar from cents Step 4: Get…
Q: Write a program that reads two pieces of information: the hourly wages and the number of hours…
A: Required: Write a python program to calculate the net salary based on given instructions. all the…
Q: Write a program in python that asks the user to enter a word and then capitalizes every other letter…
A: Capitalize every other letter in string using python code
Q: Write a program to calculate and display ticket price. using python The flight ticket price…
A: ALGORITHM:- 1. Take input from the user for all the variables. 2. Calculate the cost of the ticket…
Q: A commercial bank has introduced an incentive policy of giving a bonus to all its deposit holders by…
A: 1) Below is commercial bank incentive policy program to calculate the bonus based on balance amount…
Q: Imagine that you run a local store that has an electronic pad located at the exit of the store that…
A: Below is a required program in python: Program Approach: Display a message to the user to enter…
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 calculates the energy neededto heat water from an initial temperature to a…
A: The coding example to perform the given task will be as below : import java.util.Scanner; class…
Q: An electricity company charges their consumers according to the units consumed per month according…
A: It is defined as a powerful general-purpose programming language. It is used in web development,…
Q: An online store wants to give prizes to their loyal customers. Write a python program that reads the…
A: Program Description: An online store wants to give prizes to its loyal customers. Write a python…
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: Imagine that you run a local store that has an electronic pad located at the exit of the store that…
A: Below is the required python program: - Approach: - Prompts the user to enter the positive clicks…
Q: Write the python program that finds the total fuel cost of the vehicle according to the amount of…
A: ALGORITHM:- 1. Take input from the user. 2. Calculate average per litre of fuel. 3. Calculate the…
Q: In Python write a program that demonstrates the scenario below: An employee’s total weekly pay…
A: We need to provide a python program to employee’s total weekly pay. Where, total week pay= regular…
Q: Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the…
A: Start input age through get_age function if person is not in between 18 to 75 the print message…
Q: Write a python program that computes the amount of calories burned when you run. Your program should…
A: Use an if-else ladder to find the MET with respect to speed
Q: In Python: The line endings are missing. Usually a gift line ends with a comma (","), but the last…
A: Task : Given the python code. The task is to modify the code so that given + and , can be added to…
Q: Write a program that asks the user for two integers that will correspond to the numbering of the…
A:
Q: Write a program that calculates the potential energy of 3 charges q1 = 1, q2 = 2, q3 = 3 located at…
A: Distance between two points P1(x1,y1,z1) and P2(x2,y2,z2) = x2-x12+y2-y12+z2-z12 Put all the values…
Q: write a program. There are three seating categories at a stadium. For a softball game, Class A…
A: #include <iostream>#include <iomanip>using namespace std; int main(){ int…
Q: Write down a complete PYTHON program to do the followings; enter the information of a set of…
A: print("Enter the number of workers: ")numOfWorkers = int(input())#Then we take the hour…
Q: Write a program in Python that reads the following information and prints a payroll statement:…
A: answer : import java.util.scanner; public class employeepayroll { public static void main(string[]…
Q: Using Python, create a program that asks the user for a non-negative amount of money (in Pesos).…
A: - We need to have a menu based python program for currency.
Q: in python: Write a program with total change amount as an integer input, and output the change…
A: In this question, first, we divide the input by 100 to make in dollars, and the remainder of the…
Q: A serious accident occurred on the National Highway, so an ambulance arrived immediately and the…
A: Input/Output Process: First line contains five space separated integers N, M, R, X and Y denoting…
Q: A hot air balloon accelerates upward from rest at a rate of 0.5m/s. When the balloon is at a height…
A: The python program is written where it calculates the velocity of the balloon. The math functions…
Q: Write in a python program..Among all three (3) digit numbers; There are some special numbers where…
A: (1)Loop from 100-999 (2)Find the individual digits of the number (3)Compute the product and sum…
Q: Write a program to print the lyrics of the song “Old MacDonald." Your program should print the…
A: Step 1 : Start Step 2 : Using a print() statement to print the first verse of the lyrics. Step 2 :…
Q: Write a program that prompts the user to enter the distance todrive, the fuel efficiency of the car…
A: Program Plan: importing the libraries of utility class for scanner and other mathematical…
Q: Write a program that reads in hours, minutes and seconds as input, and outputs the time in seconds…
A: ⦁ Converting hours, minutes and seconds into seconds only.⦁ User will enter the time into hours:…
Q: Write a python program that asks the user how many credits they have taken. If they have taken 23 or…
A: Python program Prompt the user to enter the credits they have taken. Store the user entered…
Q: Write a Python program that assigns the principal amount of R10000 to variable p, assign to n the…
A: P=1000n=12r=0.08t=int(input("Enter number of months interest will be compounded:…
Q: • Leap years are any vear thet can be exactly divided by 4 (such as 2004, 2008, 2012, 2016, 2020,…
A: Year of the Leap: A leap year is one in which there is one extra day, bringing the total number of…
Q: Write a program named TypingGrades that allows a user to enter a student's number of words typed.…
A: Conditional statement: The conditional statement is used to control the flow of execution based on…
Q: In Python, A sales event at Trader Jane's is reducing some items by 25%. Store that value to a…
A: Program Planning Prompt the user for giving input on the ticket price of the item. Store the input…
Q: we have the java programe that calculate x,y,vy,vx every 10ms assume velocity and angle is input by…
A: time= time+ 0.01 icreases the time by 10 milliseconds And the System.out.print statements gets…
Q: Write a program that asks the user his/her name(first letter), semester, mlarks, and age and then…
A: Code : import java.util.*;class input{ public static void main(String[] args){ Scanner input = new…
Q: A company decided to give a year-end bonus of 5% (of his/her salary) to employee if his/her year of…
A: name = input("Enter name: ")salary = float(input("Enter salary: "))years=int(input("enter years of…
Q: Write a program that calculates the cost per square inch of a circular pizza,given its diameter and…
A: We need to find the per square inch of any circular pizza where diameter and price of pizza will be…
Q: Write a program that reads the following informa- tion and prints a payroll statement: Employee’s…
A: Lets see the solution.
Q: An electricity company charges their consumers according to the units consumed per month according…
A: 1) read number of units from user 2) use if to determine charge slab 3) calculate total charge…
Q: CREATE A PROGRAM THAT ASKS THE USER IF HE/SHE IS PWD OR SENIOR CITIZEN IF YES, THEN GIVE 20% OFF IF…
A: As no programming language is mentioned here, we are writing this program in python price =…
Q: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: Purpose of the program: This program computes the taxable income and the federal tax amount for a…
Step by step
Solved in 4 steps with 2 images
- Create a program in python wages.py that assumes people are paid double time for hours over 60. They get paid for at most 20 hours overtime at 1.5 times the normal rate. For example, a person working 65 hours with a regular wage of $10 per hour would work at $10 per hour for 40 hours, at 1.5 * $10 for 20 hours of overtime, and 2 * $10 for 5 hours of double time, for a total of 10*40 + 1.5*10*20 + 2*10*5 = $800. The number of hours should be generated randomly between 35 and 75. If the number of working hours is less than 40, display message “The salary cannot be generated” with sound of system bell as a warning.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)Write a Python program for ....Mr Ramkumar has divided his property into 3 parts in the ratio of 13:12:11 for his sons Jugal,Chandan and Raunak.The eldest(Jugal)to get maximum share and the youngest(Rounak)to get minimum share.Find the share of each son if total valuation of property is 14,40,000.
- A commercial bank has introduced an incentive policy of giving a bonus to all its deposit holders by the end of the year. The policy is as follows: A bonus of 2 percent of the balance held at the end of the year is given to everyone, irrespective of their balances, and 5 percent is given to female account holders if their balance is more than Rs.5000. Write a python program to calculate the balance at the beginning of the New YeaWrite a python program that computes the zakat, obligatory charity, on camels. The program asks the user to input the number of camels, and then the zakat is calculated based on the following table: Rule for computing the zakat of 121 camels or more: You need to find the combinations of 40 camels and 50 camels that will minimize the number of “left over” camels not being “counted” in the zakat. For example, for 130 camels, we have (2*40) + (1*50)=130, with no left overs, and hence, the zakat consists of 2 bint Laboun and 1 Hiqqah. When we have 145 camels, we have the following scenarios: 1. (140) + (250) = 140 with 5 camels left over, 2. (240) + (150) = 130 with 15 camels left over, 3. (340) + (050) = 120 with 25 camels left over. Therefore, in this case the zakat is 1 bint Laboun and 2 Hiqqah, following the first scenario. Important Notes: Make sure that the input value is a positive integer. If not, the program must print the following message: Wrong input. Number should be an…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.”
- in python Consider the following program snippet with a missing line of code: for car in cars: if car.power_kw > 200: ██████ print(car.make) print('Thank you') What should the missing line be if we want the program to print car makes until a car with over 200 kW of power is encountered? Note that the "Thank you" message must always be displayed before the program ends. a. del print b. return c. pass d. stop e. raise ValueError('too high') f. break g. continueThe interest paid on a savings account is compounded daily. This means that if you start with startbal dollars in the bank, at the end of the first day you’ll have a balance ofstartbal * (1 + rate/365)dollars, where rate is the annual interest rate (0.10 if the annual rate is 10 percent). At the end of the second day, you’ll havestartbal * (1 + rate/365) * (1 + rate/365)dollars, and at the end of n days you’ll havestartbal * (1 + rate/365)ndollars. Write a program that processes a set of data records, each of which contains values for rate, startbal, and n and computes the final account balance.How do I solve this problem in java programming language? After all loan information is input, the program should output the loans in the following format: Sanchez Construction Loan #1 Name: Joe $10000.0 for 5 year(s) at 9% interest Loan #2 Name: Sara $5000.0 for 3 year(s) at 10% interest Loan #3 Name: Mike $975.0 for 1 year(s) at 10% interest Loan #4 Name: Jane $7000.0 for 5 year(s) at 9% interest Loan #5 Name: Peter $300.0 for 1 year(s) at 9% interest
- This week's assignment involves writing a Python program to compute the weekly pay for a newspaper carrier. Earnings from a paper route job vary based on total number of papers delivered. The newspaper carrier is paid certain percentage of the cost of each newspaper delivered. For example, a carrier delivers 500 papers per day for 7 days of the week. If each newspaper costs $3.50 and the carrier gets 5% of each newspaper delivered, the weekly salary for delivering 3500 papers would be $612.50. The carriers can also receive tips from the newspaper subscribers. Total pay per week would then be the weekly salary plus weekly tips received. Write a program that prompts the user for the following input: the number of papers delivered on the route per day the number of days the paper is delivered per week the amount of tips received per week and defines (not prompt) the constant values for: the cost of each newspaper (pick a reasonable value, e.g. $3.50) the commission rate (pick a reasonable…in Python please. I have this so far def time(charge): if charge == 15 or charge == 20: return 0 elif charge == 35: return 6 elif charge == 60: return 7 elif charge == 120: return 16 You buy an international calling card to India. The calling card company has some special offers. If you charge your card with $15 or $20, you don't get anything extra. For a $35 charge, you get $6 of extra phone time. For a $60 charge, you get $7 of extra phone time. For a $120 charge, you get $15 of extra phone time. Write a function that asks the user for the amount he/she wants on the card and returns the total charge that the user gets. Note: Values other than those mentioned earlier are not allowed. Include appropriate comments to make your code more readable.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…