Create a python program for the following: Ask the user to input a color marble and set amount to 1. If the user’s input is not red increase amount by 1, let the user know that they have to pick another marble, and prompt them to do so. When the user does input red then print out a message giving them the amount of times it took them to input red.
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 python program that asks the user to enter a temperature in Celsius. The program should…
A: Program Explanation: The variable to store the temperature is declared. Prompt the user to enter…
Q: Write a program that asks the user to enter two positive integers, the height and length of a…
A: Program description: h and l are the user input integer variables that take from the user the values…
Q: In a python program where the computer chooses a random number between 1 an d 100 and the player…
A: Since our goal would be to eliminate as more possibilities as we can with each guess, so that we can…
Q: With the help of a Python program, help a contractor such that he can enter the length(in feet),…
A: Start input l,b, h and cost calculate area = 2(l+b)h+lb print area calculate cost = cost *area print…
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 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 program(PYTHON) that prompts the user to enter the three points (x1, y1), (x2, y2), and (x3,…
A: According to the Question below the solution: Output:
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 a Python program to solve the general version of the above problem. Ask the user for the time…
A: Subproblem 1 requires an explanation. So as we all know that we have a daily periodicity of 24 hours…
Q: Write a program that take input a value x from user and print the value 2*x*sin2x
A: Note- Since programming language is not mentioned so I have used C programming language. To…
Q: Write a program that receives an integer from the user and prints Positive Even, Positive Odd,…
A: The program is written in Python. Check the program screenshot for the correct indentation. Please…
Q: Write a python program that keeps track of evidence from 25 forensic cases. The user should be able…
A: I have given a python code in step 2.
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: 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: Create a python program that the user will input 3 positive integers (A,B & C) where A & B…
A: read three numbers A,B and C iterate from A to B Pass each number in summation function to get…
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 a Java program with screenshot output that does the Following: a. Print the numbers from 10 to…
A: a. Print the numbers from 10 to 1 (using while loop). b. Print the numbers (that are divisible by…
Q: Write a python program to take one number as input choice from user and check the following…
A: s = int(input("Enter a Number: "))if s==1: w= float(input('Please Enter the Width of a…
Q: In Python, Write a program whose input is two integers. Output the first integer and subsequent…
A: #get the input from the user num1=int(input()) num2=int(input()) #check if num1 is greater than…
Q: Write a program that mimics a calculator. The program should take as input two integers and the…
A: A set of data from a sample of items is given. (a) The covariance between two random variables X and…
Q: Write a program on eclipse that reads an unspecified number of scores and determines how many scores…
A: NOTE : Since programming language is not mentioned.Therefore answering question in Java language.…
Q: Good job!” and then ask for another input. When the user types an odd number, display an error…
A: Define java.util package for i/o operations Define class EvenEntryLoop Define main method taking…
Q: Write a program that takes in an integer in the range 11-100 as input. The output is a countdown…
A: Hi. Let's move on to the code in the next step. I have included comments in the code that will…
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 python program to accept a number and check the following conditions if the number is odd,…
A: in this question first take x and y and number from user.. then for each condition write appropriate…
Q: Python program that will ask a user for a number, then determine whether it is a prime number or no
A: Write a Python program that will ask a user for a number, then determine whether it is a prime…
Q: s or Tails” game. For each attempt to guess, inform the player if they have guessed correctly and…
A: Code : import randomprint("welcome to the coin toss game")t=int(input("Enter the number of games to…
Q: Write a program that asks the user for his name and salutes him using it. The prompt must be "What…
A: Given:
Q: Write a python program that accepts as input the loan amount, the interest rate per year, and the…
A: loan = int(input("How much is the loan: "))rate = int(input("Enter interest rate:…
Q: Write a python program and take two inputs from the user. The first input will be the number of…
A: #reading two inputs from usernumberOfCanvases = int(input('Enter 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 prompts the user to input integer number between 6 and 7. If the number…
A: x = float(input("Enter a value for x between 0 and 7: ")) if x < 6: print(x)elif x = =…
Q: Write a Python program that will ask the user for his/her weight (in kilograms), then compute and…
A: As given, we need to write a Python program that takes user weight(in kilogram) as input, compute…
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: Write a python program that does temperature converter :\n", "- The user will enter if he wants the…
A: I give the code in Python along with output and code screenshot
Q: Write a Python program that asks the user for one number and tells if it is a prime number or not.…
A: num = int(input("Enter the number: "))if num > 1: # Iterate from 2 to n / 2 for i in…
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: Written In Python The amount of time students spent studying for an test is exponentially…
A: According to the information given:- We have to write python code by following the instruction and…
Q: Write a python program that takes an option from the user and based on the option read two numbers…
A: ALGORITHM:- Show options as shown in question. Read user input and store in a variable. If the user…
Q: In python, write a program that receives an integer, greater than or equal to 2, from the user and…
A: What is Python? Python is a widely used high-level, general-purpose programming language for…
Q: Write a program in python that reads a number and prints all of its binary digits: Print the…
A: Python Program: def DToB(n): if n >= 1: DToB(n // 2) print(n % 2, end=' ')n =…
Q: In python, write a program that receives an integer from the user, called n, and prints the first n…
A: In this question we need to write a python program which takes an integer input n from user and…
Q: Write a program, which prints the following pattern based on the prime number. Suppose we would like…
A: Here is the python code of above problem. see below step for code
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: Write a program that calculates and prints the volume of a pyramid given the base (b) and the height…
A: Note: Below is the required program in the C++ language. Program Approach: Defining the necessary…
Q: Implement a python version of the game Hangman in which a player attempts to guess a secret word one…
A: Solution:-- 1)The given question has required for the solution which is to be provided as the…
Q: In Python, Write a program that takes in a line of text as input, and outputs that line of text in…
A: EXPLANATION: - An empty list named str_list is created to store the string the user enters. The…
Q: Write a python program for a pig game that has two players that alternate turns rolling dice. In…
A:
Q: Write a python program that asks the user for a temperature. Then ask them what units, Celsius or…
A: Program Explanation: Define the variable called “temperature”. Prompt the user to enter the…
Create a python program for the following:
Ask the user to input a color marble and set amount to 1. If the user’s input is not red increase amount by 1, let the user know that they have to pick another marble, and prompt them to do so. When the user does input red then print out a message giving them the amount of times it took them to input red.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images
- Write a Python program that prompts the user for the cost of two items to be purchased. Then prompt the user for their payment. If they enter an amount that is less than the total cost of the two items, print a message that tells them how much they still owe. Otherwise, print a message that thanks them for their payment and tells them how much change they will receive.Write a Python program that prompts the user for the cost of two items to be purchased. Then prompt the user for payment. If the amount entered is less than the total cost of the two items, print a message that states how much is still owed. Otherwise, print a thank you message and state how much change will be given.Write a python program that asks the user how many credits they have taken. If they have taken 23 or less, print that the student is a freshman. If they have taken between 24 and 53, print that they are a sophomore. The range for juniors is 54 to 83, and for seniors it is 84 and over
- Write a program that accepts a number corresponding to a plane figure: Right Triangle Rectangle Circle The program will then ask for the following: base and height – if the previous input is 1 (right triangle) width and length – if the previous input is 2 (rectangle) radius – if the previous input is 3 (circle)Write a python program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows: When the program begins, a random number in the range of 1 through 3 is generated. If the number is 1, then the computer has chosen rock. If the number is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors. (Don’t display the computer’s choice yet.) The user enters his or her choice of “rock,” “paper,” or “scissors” at the keyboard. The computer’s choice is displayed. A winner is selected according to the following rules: If one player chooses rock and the other player chooses scissors, then rock wins. (Rock smashes scissors.) If one player chooses scissors and the other player chooses paper, then scissors wins. (Scissors cuts paper.) If one player chooses paper and the other player chooses rock, then paper wins. (Paper wraps rock.) If both players make the same choice, the game must be played…Write a python program and take two inputs from the user. The first input will be the number of canvases and the second input will be the number of paint tubes ordered. Based on the price of each item, calculate the total amount that Fiona needs to pay including the discount.
- Develop a python program that prompts the user to enter the number of times he / she wants to play the “Guess Heads or Tails” game. For each attempt to guess, inform the player if they have guessed correctly and give a status report on the number of plays, the number of correct guesses, the number of incorrect guesses and the correct percentage. At the end of the number of plays, evaluate the player’s record and give an evaluation rating based on the correct percentage. 0 to 30 % poor guesser 31 to 60 % fair guesser 61 to 80 % good guesser 81 to 95 % genius guesser 96 to 100 % you must be cheatingWrite a python program that lets the user play the game of Rock, Paper, Scissors against the computer. The program should work as follows: When the program begins, a random number in the range of 1 through 3 is generated.If the number is 1, then the computer has chosen rock. If the muraber is 2, then the computer has chosen paper. If the number is 3, then the computer has chosen scissors.(Don't display the computer's choice yet.) The user enters his or her choice of "rock," "paper," or "scissors" at the keyboard. The computer's choice is displayed. A winner is selected according to the following rules: If one player chooses rock and the other player chooses scissors, then rock wins.(Rock smashes scissors.) If one player chooses scissors and the other player chooses paper, then scissors wins.(Scissors cuts paper.) If one player chooses paper and the other player chooses rock, then paper wins.(Paper wraps rock.) If both players make the same choice, the game must be played again to…Create a python program that the user will input 3 positive integers (A,B & C) where A & B represents the range from A to B (A<=B) and C represents the sum of the digits. the output is to print all numbers whose sum is c from a to b.
- Write a program that prompts the user to enter threepoints, (x1, y1), (x2, y2), and (x3, y3), of a triangle then displays its area.The formula for computing the area of a triangle iss = (side1 + side2 + side3)/2; _________________________________ area = √s(s - side1)(s - side2)(s - side3)Here is a sample run: Enter the coordinates of three points separated by spaceslike x1 y1 x2 y2 x3 y3: 1.5 -3.4 4.6 5 9.5 -3.4 ↵EnterThe area of the triangle is 33.6create a Java program that repeatedly asks the user whether they wish to calculate another square root. If the response is "y", then the program should proceed; if it is anything else, then the program should quit. Whenever it proceeds, the program should prompt the user for a number (a positive double, and your program may simply assume the input is consistent with this requirement) and then report the square root of that number to within a relative error of no more than 0.01%. The computation must be done using Newton iteration. The intuitive idea of Newton iteration for computing square roots is fairly straightforward. Suppose you have a guess r for x1/2 that is too large; the argument is similar if it is too small. If r is too large to be the square root of x, then x/r must be too small, so the average of r and x/r should be a better guess than either r or x/r. This suggests that if you repeatedly replace your current guess r by (r + x/r)/2, then your sequence of guesses should…Write a Python program that will allow a user to guess a secret number between 100 and 1000. The secret number is randomly generated by the computer. After the user enters their guess, the program checks the guess against the secret number. If the user guessed the correct number, the program will tell the user they won. If the user didn’t guess the correct number, the program will tell the user if their guess was higher or lower than the secret number and give the user another opportunity to guess. This time the user will either be told they won or lost. If they lost, the secret number should be revealed to the user.