Write a python program and solve the problem. Selling a new vehicle pays a salesperson $1800. Selling a used vehicle pays a commission of 10% of the selling price. Write an interactive program that calculates a salesperson's total pay for selling two vehicles, one of each type. The program should prompt the salesperson to enter the type and selling price of each vehicle. Do not use a loop. The program should then display the salesperson's total sales and total pay. Express these amounts in currency format as described in the requirements above.
Q: In python In PyCharm, write a program that prompts the user for their name and age. Your program…
A: Answer :
Q: Write a python program that prompts the user to enter a series of strings, but with each string…
A: s=u=0print("Enter a string and a number")while(1): a=input("Enter a string :") if a=='0':…
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 in python that allows an instructor to calculate the final grade for the students in…
A: Python is an interpreted, high-level and general-purpose programming language. Created by GVR and…
Q: Write a Python program for an online MoonBucks coffee order. Coffee is sold by the pound, and the…
A: Algorithm of the Program: Declare the necessary variables and collect the user's input for the pound…
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 Python program that asks the user to enter a non-negative number (float). If the user does…
A: Program Approach – Import the essential modules. Prompt user to enter the number. Use WHILE loop…
Q: Write a Python program that prompts the user for the cost of two items to be purchased. Then prompt…
A: #ask user to enter price of item 1 and 2 price1=float(input("Enter price of item 1 "))…
Q: Write a python program that takes an option from the user and based on the option read two numbers…
A: Question 1 Python is a scripting language and also an object-oriented language. Python also supports…
Q: Write Python programs to solve the problem. Shipping is free for online orders totaling $50 or more…
A: Python program that prompts for the unit price of an item and its quantity#get the inputs from the…
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 to compute the sum of the first N Fibonacci numbers, where N is an integer that is…
A: import java.util.Scanner;public class Main{ public static void main(String[] args) { //declaring…
Q: in python, Write a wholly creative quiz program that consists of three original questions that you…
A: PSEUDO CODE: BEGIN //Reading Question 1 from the user READ continents //Checking condition…
Q: Write a program that finds and displays all the "odd numbers" between 1 and N. The value of N is an…
A: Algorithm: 1. Start. 2. Initialize sum to 0 and declare n. 3. Read the positive integer as n. 4.…
Q: in python Write a program that prompts the user for three keyboard inputs and stores them in…
A: Write a program that prompts the user for three keyboard inputs and stores them in appropriately…
Q: Write a Python program to: ask the user to enter the price of an item. Note: use a whileloop to…
A: The following is the python code along with the comments to have a better understanding of the code.…
Q: write a Python program that asks the user for the amount of a sale, and outputs the final sale after…
A: Given : To write a python program that asks user to enter amount of sale and outputs the final sale…
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: Create a python program for the following: Ask the user to input a color marble and set amount to 1.…
A: Take a variable to count the trials Take a variable to input the color of marble. Use a loop to take…
Q: Write a program named FahrenheitToCelsius that accepts a temperature in Fahrenheit from a user and…
A: using System; namespace Celsius{ class Program { static void Main(string[] args)…
Q: Ibra Electricity Company has an automated system that calculates the total bill for each area in a…
A: Ibra Electricity Company has an automated system that calculates the total bill for each area in a…
Q: Write a python that calculates the position of a car moving in a 2D-plane given the list of…
A: To write the python program with the given description: Use a while loop, that will prompt the user…
Q: create a Python program that simulates a race by calculating the distance Usain Bolt and a series of…
A: First of all, thanks for this fun question, the code is..... # Average speeds in miles per hour#…
Q: JAVA program will resemble a comp appl that is used to show the largest value in a series well for…
A: We need to read a series of number using "Integer.parseInt(sc.nextLine())" and then we need to find…
Q: In Python: Write a program with total change amount as an integer input, and output the change…
A: Approach: Defining the main function Getting the input from the user that is the change Checking…
Q: In this lab, you add nested loops to a Python program progiall pil 2 # across and 5 asterisks down.…
A: Program NUM_ACROSS=3 NUM_DOWN=5 for row in range(NUM_DOWN): for col in range(NUM_ACROSS):…
Q: Write a Python program to ask the user how many gallons of gasoline can their car hold and how far…
A: By the given problem, the coding example will take input from the user of tank capacity of the car…
Q: Write a Python program for an online MoonBucks coffee order. Coffee is sold by the pound, and the…
A: Algorithm:Following is the python program that takes as input from user the number of pounds to be…
Q: Write a program in python that asks the user to enter positive integer numbers using the keyboard.…
A: #Function of splitodddef splitodd(Arr): oddlist = [] for i in Arr: if i >= 0: if…
Q: Write a complete Python program that prompts user for the number of floors in a hotel. Validate the…
A: Start Declare isFloor as boolean for validating number of floors. Input number_of_floors. Validate…
Q: Write a program that will help you to learn multiplication. The program prompts the user to enter…
A: As there is no programming language mentioned in this question so program is attempted in c++…
Q: Python write a program that allows the store to enter the total positive clicks and the total…
A: Python code for: Here you need to take 2 inputs from the user and then do subtraction to get the…
Q: Write a program to solve the problem of Tower of Hanoi. User would input the number of plates they…
A: Given: Write a program to solve the problem of Tower of Hanoi. User would input the number of…
Q: Write a python program that lets the user play the game of Rock, Paper, Scissors against the…
A: #Rock, Paper, Scissors Game import random while True: choice=int(input("Enter your choice 1.Rock,…
Q: Write a python program that calculates the amount of money a person would earn over a period of time…
A: Let's understand step by step : 1. The user will enter the number of days of earning which will be…
Q: Write a Python program that prompts the user for the cost of two items to be purchased. Then prompt…
A: Given: Write a Python program that prompts the user for the cost of two items to be purchased. Then…
Q: In Python: Write a program whose input is two integers. Output the first integer and subsequent…
A: Purpose of the program: This program should print values within a range. Here a sample code is…
Q: Write a python program that first asks the user how many numbers should be entered. Then the program…
A: n=int(input("No. of Inputs: ")) l=[] print(f"Enter {n} numbers: ") for i in range(0,n):…
Q: In Python programming language. Write a program that calculates the sum of prime numbers that could…
A: Step 1: Read bStep 2: While (temp=true):Step 3: if b is positive Call sum().…
Q: Create a Python program to model if someone wants to buy a video game at a certain price, between $1…
A: k=1 # Control Variable for loopwhile(k==1): # Run loop until k=1 # Let User input the price of…
Q: Write a fully documented Java program that asks the user to enter a list of exam scores given as…
A: ALGORITHM:- 1. Take input for marks from the user. 2. Continue taking marks until -1 is entered. 3.…
Q: I am stuck trying to create a program in PYTHON that calculates the coins needed to make change for…
A: Answer: I have done code and also I have attached code
Q: A program to convert letters to their corresponding telephone digits. Write a Java program that will…
A: EXPLANATION: - The Scanner class is present in the util package. It is imported to read the user…
Q: Write a python program that allows a user to guess if certain letters are in a word. Theprogram…
A: Given: Write a python program that allows a user to guess if certain letters are in a word.…
Q: Write a pseudocode for a program that asks the user for a number and displays the number 1000 times…
A: The question requires to Take Input from the user for any number and display the number for 1000…
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 python program which creates and outputs variables of various types. For any lines of code…
A: Program: #Creating variablesa=24b=9.24c="24'42'"d='42"24"'e='''34"43"'''f="""62'26'""" #output the…
Q: Write a python program that takes an option from the user and based on the option read two numbers…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: I am stuck trying to create a program in PYTHON that calculates the coins needed to make change for…
A: We know penny=1 cent, nickel=5 cents, dime=10 cents and quarter=25 cents.Now for example if we have…
Q: Write a python program for a pig game that has two players that alternate turns rolling dice. In…
A:
Write a python
Selling a new vehicle pays a salesperson $1800. Selling a used vehicle pays a commission of 10% of the selling price. Write an interactive program that calculates a salesperson's total pay for selling two vehicles, one of each type. The program should prompt the salesperson to enter the type and selling price of each vehicle. Do not use a loop. The program should then display the salesperson's total sales and total pay. Express these amounts in currency format as described in the requirements above.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- Write a complete Python program that prompts user for the number of floors in a hotel. Validate the floors input: Do not accept a value less than 1 for the number of floors. A loop should then iterate once for each floor. During each iteration, the loop prompts user for The number of rooms on the floor. Validate the rooms input: Do not accept a value less than 10. The number of rooms that are occupied. Validate the occupied rooms input: Do not accept a value greater than the number of rooms on the floor. Calculate the number of vacant rooms on each floor. Calculate the occupancy rate on each floor Occupancy rate = 100 * (double)rooms occupied / rooms on floor Display data on each floor (rooms, occupied rooms, vacant rooms, occupancy rate) Calculate total number of rooms the hotel has Calculate total number of occupied rooms the hotel has Calculate total number of vacant rooms in the hotel Calculate the occupancy rate for the hotel Hotel Occupancy Rate = 100 *…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.Write a Python program that prompts the user to enter the amount of steps they would like to walk for a month. A loop should then prompt the user to enter the steps for each week and keep a running total. When the loop finishes, the program should display the amount of total steps and let the user know if they have achieved their desired amount of steps or not.
- Write a Python code for A dramatic theater has three seating sections, and it charges the following prices for tickets in each section: section A seats cost $20 each, section B seats cost $15 each, and section C seats cost $10 each. The theater has 300 seats in section A, 500 seats in section B, and 200 seats in section C. Design a program that asks for the number of tickets sold in each section and then displays the amount of income generated from ticket sales. The program should validate the numbers that are entered for each section. Make sure to generalize the process so that a theater can have any number of sections.Imagine that you run a local store that has an electronic pad located at the exit of the store that allows customer to rate your store's service. The touch pad has two button clicks available to customers: negative or positive. At the end of the day, the final daily score is calculated as follows: Daily score = Positive clicks – Negative clicks If a daily total is 5 positive comments and 3 negative comments, the total daily score for the day is 2. Using Python write a program that allows the store to enter the total positive clicks and the total negative clicks. The output should be the daily score for the store. An example would be the following: Enter positive clicks for today: 5 Enter negative clicks for today: 3 The daily score using 5 positive clicks and 3 negative clicks is 2. There are a few different data types that can be used to capture the input from the user. Some data types might require a conversion to perform the math required. When completed, take a screenshot of your…Write a program to solve the problem of Tower of Hanoi. User would input the number of plates they are going to work on and your program would print the procedure (all the steps of moving the disk from one pole to another pole). The Tower of Hanoi or Towers of Hanoi (also known as The Towers of Brahma) is a mathematical game or puzzle. It consists of three rods, and a number of disks of different sizes which can slide onto any rod. The puzzle starts with the disks neatly stacked in order of size on one rod, the smallest at the top, thus making a conical shape. The objective of the puzzle is to move the entire stack to another rod, obeying the following rules: Only one disk may be moved at a time. Each move consists of taking the upper disk from one of the rods and sliding it onto another rod, on top of the other disks that may already be present on that rod. No disk may be placed on top of a smaller disk. The sample output for three disks is: Enter the number of disks: 3 The…
- Write a python program. A cookie recipe calls for the following ingredients: 1) 1.5 cups of sugar 2)1 cup of butter 3) 2.75 cups of flour The recipe produces 48 cookies with this amount of ingredients Price for each ingredient is a follows: 1)$2.25 for each cup 2)$4 for each butter cup 3) $2.50 for each flour cup Write a program that ask user how many cookies they want to make and then display the number of cups of each ingredient needed for the specific number of cookies and the total price. The minimum order that can be placed is for 20 cookies. if less than 20 cookies display the black table as provided in one of the use-case. Each column is right aligned with 20 spaces. the value in the table are displayed as s decimal places The program must work exactly like the provided use cases.Write a python program that first asks the user how many numbers should be entered. Then the program will read that many numbers from the user, and print the numbers which are even, odd and a multiple of 8. For example, if user input is 5, your program should read 5 numbers and check if they are even,odd and a multiple of 8. You must use loops to solve this problem.Sample Input:No. of Inputs = 5User then should be asked to input 5 numbers and print accordingly in the following manner Sample Input Sample Output10 10 is an even number but NOT a multiple of 816 16 is an even number and a multiple of 835 35 is an odd number and NOT a multiple of 88 8 is an even number and a multiple of 813 13 is an odd number and NOT a multiple of 8In Python: Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (current_price * 0.051) / 12. Output each floating-point value with two digits after the decimal point, which can be achieved as follows:print('{:.2f}'.format(your_value)) Ex: If the input is: 200000 210000 the output is: This house is $200000. The change is $-10000 since last month. The estimated monthly mortgage is $850.00. Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment. Such precision is an important part of programming.
- In Python: Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies. If input is 0 or less, output is 'No Change' For Example: Input: 45 Output: 1 Quarter 2 DimesIn python >>> play_nim(10) The goal is 10. Pick a number between 1 and 3 Current Score 0. Player 1 enter a number: 1 Current Score 1. Player 2 enter a number: 2 Current Score 3. Player 1 enter a number: 9 Invalid number, try again. Current Score 3. Player 1 enter a number: 1 Current Score 4. Player 2 enter a number: 3 Current Score 7. Player 1 enter a number: 3 1 >>> play_nim(4) The goal is 4. Pick a number between 1 and 3 Current Score 0. Player 1 enter a number: 3 Current Score 3. Player 2 enter a number: 3 2 >>> play_nim(21) The goal is 21. Pick a number between 1 and 3 Current Score 0. Player 1 enter a number: 0 Invalid number, try again. Current Score 0. Player 1 enter a number: -78 Invalid number, try again. Current Score 0. Player 1 enter a number: 3 Current Score 3. Player 2 enter a number: 2 Current Score 5. Player 1 enter a number: 1 Current Score 6. Player 2 enter a number: 3 Current Score 9. Player 1 enter a number: 2 Current Score 11. Player 2…Make a Simple unit converter in Python that supports (length and time) and inputs the value and the initial unit measurement. Using the mentioned measurements (length and time). The user will pick either length or time. it then computes and shows the three types of conversion (Ex. 12 inches = (1) foot/feet, (30.48) centimeters, (304.8) millimeters). The unit conversion program allows the user to input a chosen conversion and repeats the program until the word “stop” is typed.