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
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 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 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 that determines a student grade's given his/her final score. Use the following table…
A: According to the Question below the Solution: Output:
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: Write a small game in Python: The user thinks of a natural number from 1 to 1000. The computer tries…
A: As per guidelines we can answer only one question so for answer of other questions please ask…
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: Write a program with total change amount in pennies as an integer input, and output the change using…
A: Java Code: import java.util.Scanner; public class LabProgram { public static void…
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 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: Write a program with total change amount in pennies as an integer input, and output the change using…
A: Actually, 000Java is a programming language originally developed by James Gosling at Sun…
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 can be used to calculate the federal tax. The tax is calculated as follows: For…
A: The question is to write a code for the given problem and no language has been mentioned, here C++…
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: 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: 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 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 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: Write a program to read basic salary (bsalary) and sales (sales) then calculate and print the net…
A: C++ program for above : #include <bits/stdc++.h> using namespace std; int main() {…
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 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: 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 can be used to calculate the federal tax. The tax is calculated as follows: For…
A: PROGRAM: //header files #include <iostream> #include<iomanip> //using namespace using…
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: Write a program that can be used to calculate the federal tax. The tax is calculated as follows: For…
A: Python Code Standard_Exemption = 4000; Tax_Salary = 0.0 tax = 0.0 child = 0 Marital_Status =…
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: 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: Write a program that calculates the attendance percentage for students, there are total 120 working…
A: Note: In this question the coding language is not specified then we are doing this question in the…
Step by step
Solved in 2 steps
- Write a program named GuessingGame that generates a random number between 1 and 10. (In other words, in the example above, min is 1 and max is 11.) Ask a user to guess the random number, then display the random number and a message indicating whether the users guess was too high, too low, or correct.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 PYTHON program to prepare a menu for a restaurant customer. The customer will input his/her budget, and the program will compute their bill based on the following: The customer must order a main dish (15TL). If they have money remaining, a starter, dessert or both will be added to their menu, depending on the remaining budget. (Starter costs 10 TL, Dessert costs 8 TL) The program will display the final bill, as well as their remaining budget. --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sample Run: Enter budget: 24 Main dish added. Budget not sufficient for starter... Dessert added. Total Meal Cost: 23 Remaining Budget: 1 Sample Run: Enter budget: 50 Main dish added. Starter added. Dessert added. Total Meal Cost: 33 Remaining Budget: 17 Sample Run: Enter budget: 28 Main dish added. Starter added. Budget not…
- Q. 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.A company decided to give a year-end bonus of 5% (of his/her salary) to employee if his/her year of service is 5 to 10 years and 10% (of his/her salary) to employee if his/her year of service is more than 10 years, but for the employee that do not meet the minimum criteria their bonus is P500.00 only. Create a Python program that will ask the employee's name, salary and year of service and then print the bonus amount based on their years of service and salary.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.
- Python Programming. Write a program that computes the cost of a long-distance call. The cost of the call isdetermined according to the following rate schedule:• Any call started between 8:00 A.M. and 6:00 P.M., Monday through Friday, isbilled at a rate of $0.40 per minute.• Any call starting before 8:00 A.M. or after 6:00 P.M., Monday through Friday, ischarged at a rate of $0.25 per minute.• Any call started on a Saturday or Sunday is charged at a rate of $0.15 perminute.The input will consist of the day of the week, the time the call started, and the lengthof the call in minutes.The output will be the cost of the call. Notes:1. The time is to be input as 4 digit number, representing the time in 24-hournotation, so the time 1:30 P.M. is input as 13302. The day of the week will be read as one of the following three character string:‘Mon’, ‘Tue’, ‘Wed’, ‘Thr’, ‘Fri’, ‘Sat’ or ‘Sun’3. The number of minutes will be input as a positive integer. For example, an execution could look like…In Python write a program that demonstrates the scenario below: An employee’s total weekly pay equals the hourly wage multiplied by the total number of regular hours plus any overtime pay. Overtime pay equals the total overtime hours multiplied by 1.5 times the hourly wage. Write a program that takes as input the hourly wage, total regular hours, and total overtime hours and displays an employee’s total weekly pay.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.”
- Suppose that the cellular phone bill of a client is computed according to the following ratestable for calls:First 5 min P100.00 (minimum charge)Next 10 min P8.00 per minNext 15 min P6.00 per minExcess over 30 min P1.50 per minText messages cost P1.00 per send. Write a program that computes the phone bill based onthe number of minutes used up and the number of text messages sent that are to be readfrom the keyboard. The program should be able to compute the bill for a maximum of 10clients. The user specifies the number of clients to be billed at the start of the program.Write 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…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. continue