Use Python to : Write a program that asks the user for a number in the range of 1 through 7. The program should display the corresponding day of the week, where 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, 7 = Sunday. The program should display an error message if the user enters a number that is outside the range of 1 through 7.
Q: Find the value of cos3(x) using a Python program in which the user enters the value of cos(x). But…
A: The value of cos(x) is lies between: −1 ≤ cos(x) ≤ 1
Q: Write a program in Python program to remove punctuations by taking input from the user as…
A: Using loop: Using List Comprehension:
Q: Use python ( Converting a given date to the day number in the year) Write a program that…
A: Here is the code for you: #! /usr/bin/pythonprint 'Enter the date in the format mm dd yyyy: ',import…
Q: 8.2 LAB: Max of 2 Write a program that takes in two integers and outputs the larger value. Ex: If…
A: Python code to print larger of 2 elements is given below.
Q: Write a program that estimates the value of the mathematical constant e by using the following…
A: The given series program is as follows:
Q: 5. Prompt the user to enter the values of two double variables and print "True" in the output if the…
A: start Input two double values check if these two values in between 0 and 1 if yes print True else…
Q: Write a program that asks the user to enter two numbers and print the sum, difference, product and…
A: INTRODUCTION: Here we need to create a program that asks the user to enter two numbers and print the…
Q: In Python Which of the following statements will execute if given x=2 and name = "? a. if x-2: b.…
A: According to the Question below the Solution:
Q: Answer below question with code and output please There are total three numbers entered by user to…
A: HI THEREI AM ADDING CODE AND OUTPUT BELOWPLEASE GO THROUGH ITTHANK YOU
Q: A sphere with radius rr is inscribed perfectly tightly into a cube. Write a python program that…
A: Python: Volume of a Sphere A circle is a three-layered strong with no face, no edge, no base and no…
Q: Write a program which calculates the balance of a savings account after the first three months. To…
A: The question has been succesfully solved with Screenshot of code and output with 100%…
Q: USE PYTHON A small shop sells 280 different items. Each item is identified by a 3 – digit code. All…
A: Maintain separate variables to store number of cards, sweets, stationery and toys
Q: 3) Write a Python code that asks the user to input four numbers, calculate the minimum number and…
A: Python Code f
Q: Use Python Write a program to prompt the user for hours and rate per hour to compute gross…
A: Answer: Program:- #!/bin/python3 #it is python version (no need to write) Hours=int(input("Enter…
Q: Write a python program that prompts a user to input a number and checks if the entered number is a…
A: In step 2, you will the python code.In step 3, you can see the sample output.In step 4, you will get…
Q: 2 - Write a python program that ask user to input numbers until user enter exit, and outputs the…
A: Algorithm:- (I) start a while infinite loop, take string input from user until user press exit.…
Q: Ask the user to input a number and find it's square. Print the result. Use c and java
A: GIVEN: Ask the user to input a number and find it's square. Print the result. Use c and java
Q: Write a Python program that asks the user to input the name, hourly pay rate and hours worked for an…
A: PROGRAM: #Getting input from the user name=input("Enter name of Employee: ")…
Q: Write a program that asks the user to enter three values the program then calculates the average of…
A: The following algorithm is needed to develop the program with given description: Include header…
Q: Write the pseudo code for this problem based on what you learned from the video. The purpose is to…
A: Pseudocode is a representation of code that even a layperson with basic programming knowledge can…
Q: For grading system (0 to 100) for the course MATH, SCIENCE and ENGLISH create a program that will…
A: math = int(input())science= int(input())english = int(input()) average= ((math+science+english)/3)…
Q: Using C++, write a program that will check the employees years in service and office. The user will…
A: Given: Using C++, write a program that will check the employees years in service and office. The…
Q: write c # program asking the user to enter the hour in seconds and then convert it into hours,…
A: A C# program is as follows, File name: “main.cs” using System; class Sample { /* Define the…
Q: Code should be in Python, please 1. Prompt the user for a string that contains two strings…
A: spilt() function in Python splits a string into a list. not in key word is used to check if comma is…
Q: Write a program using flowchart (or python, c++) that computes for the average of scores of a…
A: C++ code: #include <iostream>using namespace std; int main() { int marks[99], m, i, a=0,…
Q: Create a flowchart and code for this problem: Using python, create a program that will accept 10…
A: Take user input for 10 integers and store them in variables, num1, num2, till num10. Multiple…
Q: what is the algorithm? Write a program that prompts the user to enter a number with the range of 1…
A: ALGORITHM: The Algorithm is defined as a step-by-step process of how to execute a set of…
Q: PROBLEM: Write a program that prompts the user to input three (3) integers: MM, DD, and YYYY. For…
A: #include <iostream>using namespace std;// to check if year is leap year or notbool isLeap(int…
Q: 1. Hello (9 Lines) The very basic of programming is input and output, write a program that asks the…
A: Note: According to Bartleby guidelines we are allowed to answer only 1 question please repost the…
Q: After executing the following program, the Python interpreter will generate an error. Write which…
A: Line# 3 will generate an error.
Q: What is the correct Python expression for checking to see if a number stored in a variable x is…
A: To check whether the a number stored in a variable x is between 0 and 5 then the condition is "x…
Q: Write python code that prompts the user to enter a number in the range 1 to 10 (inclusive) and…
A: The Answer is in step-2.
Q: Write Python code that asks the user to enter a text, then your code should print each word and how…
A: Given: Write Python code that asks the user to enter a text, then your code should print each word…
Q: Exercise 4: Write a Python program that displays the times table of a given number. The program asks…
A: Given: Python program that displays n m nxm 7 1 7 7…
Q: Give the output of the following code based on the given inputs. The body mass index (BMI) is…
A: Python Program: # For declaring the variables height = 0.0 weight = 0.0 BMI = 0.0 # Taking the…
Q: Write a Python program to calculate the revenue from a sale based on the unit price and quantity of…
A: Please find the answer below :
Q: The program will receive 2 Input values for the number of hours and minutes that the car has used…
A: here in this program we need to calculate the parking fee. The program will receive 2 Input values…
Q: Create a flowchart and code for this problem: Using Python, Create a program that will accept 20…
A: 1- In this assignment, first take the input from the user. 2- Validate that number 20 or not. If…
Q: Write a Python program that will indicate which substances will freeze and which substances will…
A: - We need to code for freezing and boiling substances problem.
Q: ssume a number sequence, where first 3 numbers, n0 = 3, n1 = 0 and n2 = 2 are given and the 4th…
A: Summary: In this question, we have been given one sequence and we have to print that sequence using…
Q: Could you help me in python to write a program that receives a series of numbers from the user and…
A: Please give positive ratings for my efforts. Thanks. PROGRAM theSum = 0.0 # stores the number of…
Q: Write a Python code for the following: Ask the user to enter a number, N (Total number of inputs to…
A:
Q: Write a program that prompt the user to enter the number of students and each student's score, and…
A: #include <iostream>using namespace std; struct student{ char name[50]; float marks;}…
Q: B) Write a Python code that asks the user to input four numbers, calculate the minimum number and…
A: # Asking for four number from usera = int(input("Enter first number: "))b = int(input("Enter second…
Q: Write a program that allows the user to specify the number of iterations used in this approximation…
A: # if you want value of pi then you need to multiply by 4 in given equation# because the relation is…
Q: (a) If the number is positive, add the number to the variable positiveSum; (a) else, add the number…
A: A) The equivalent c++ code is if(number>0) { positiveSum+=number; } else if(number<0) {…
Q: Use Python)Write a statement which assigns all the odd integer values between 0 and 10 (in order) to…
A: Here I have taken an empty list named odds, that will store the elements. Now I have used a loop to…
Q: Write a Python program that asks user to enter the month (1-12) and the year. The program should…
A: Program Approach - Prompt user to enter the month and year. Define the leap() function to determine…
Q: Write a Python program that will indicate which substances will freeze and which substances will…
A: def printFreezeBoil(t,l): freezeList=[] boilList=[] for i in l:…
Use Python to :
Write a program that asks the user for a number in the range of 1 through 7. The program should display the corresponding day of the week, where
1 = Monday,
2 = Tuesday,
3 = Wednesday,
4 = Thursday,
5 = Friday,
6 = Saturday,
7 = Sunday. The program should display an error message if the user enters a number that is outside the range of 1 through 7.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- Python Programming Only Please: Write a program that asks the user to enter a person’s age. The program should displaya message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: • If the person is 1 year old or less, he or she is an infant.• If the person is older than 1 year, but younger than 13 years, he or she is a child.• If the person is at least 13 years old, but less than 20 years old, he or she is a teenager.• If the person is at least 20 years old, he or she is an adult.An online book club awards points to its customers based on the number of books purchased each month. Points are awarded as follows: Books Purchased Points Earned 1 5 2 15 3 30 4 or more 60 Write a program that asks the user to enter the number of books purchased this month and then displays the number of points awarded.XYZ Company, LLC uses a program to manage the information of their employees. The program gets the name of the employee, number of hours worked and rate per hour. It computes the salary by multiplying the number of hours worked with rate per hour. If the salary is more than 1000, tax is computed as 5% of the salary, otherwise, tax is computed as 2% of the salary. The program will display the name of the employee, salary and tax.
- Challenge Problem python G U E S S T H E N UM B E R Write a program that plays a guessing game with the user. The program should have the right answer set to 13, then prompt the user repeatedly to guess the number from 1 to 25. When the user guesses incorrectly, the game should give the user a hint about whether the correct answer is higher or lower than the guess. Once the user guesses correctly, the program should print a message showing the number of guesses that the user made. Note : This assignment involves the use of a while loop and if-else decision making controls. You CANNOT use the reserved keywords break and continue for any portion of this program or any program for that matter throughout this course.PYTHON code that finds the prime divisors of a number entered on the keyboard and prints it on the screen write. (For example, the prime divisors of 10 are 2 and 5. The prime divisors of 20 are 2 2 and 5. Truck.)Car sales commission problem - For each used car a salesperson sells, the commission paid is as follows: $20 plus 30% of the selling price in excess of the cost of the car. Typically, the minimum selling price of the car is the cost of the car plus $200 and the maximum selling price is the cost of the car and $2,000. Write a program that prompts the user to enter the salesperson’s fixed commission, the percentage of the commission, the purchasing cost of the car, the minimum and the maximum amount to be added to the purchasing cost to determine the minimum and the maximum selling price, and outputs minimum and maximum selling price of the car and the salesperson's commission range. As a suggestion, pay particular attention to the formulas would your being requested. I would recommend that you perform the calculations on paper or in Excel prior to programming the solution. Paint usage calculator -A room has one door, two windows, and a built-in bookshelf and it needs to be painted.…
- A retail store grants its customers a maximum amount of credit. Each customer’s available credit is his or her maximum amount of credit minus the amount of credit used. Write a program that asks for a customer’s maximum amount of credit and then asks for the amount of credit used. The program should then properly display the customer’s available credit.Q#3: Develop a program to ask the user to enter a number, if the user enters a positive integer, then compute the factorial of that number and display it on the screen.PLEASE COMMENT CODE Write a Python program that does the following Asks the user to enter the order. If the order is greater than $1000, there is 17% discount, if the order is greater than $800 and less or equal to $1000, the discount is 13%, if the order is less or equal to $ 800 but greater than $ 500, the discount is 9%, otherwise the discount is 5%. The tax percent is 13%. The program calculates the total invoice of the customer after the appropriate discount and the tax amount are applied. The program prints out the customer name (entered by the user), the discounted amount, the tax amount and the total invoice. The program asks if the user wants to continue using the application with a new order (y/n). Sample run: Please, enter the name of the customer: John Smith Please, enter the total of your order: $1100 Customer name: John Smith The order amount: $1100 The discounted…
- Joe’s Pizza Palace needs a program to calculate the number of slices a pizza of any size can be divided into. The program should perform the following steps: Ask the user for the diameter of the pizza in inches. Calculate the number of slices that may be taken from a pizza of that size. Display a message telling the number of slices. To calculate the number of slices that may be taken from the pizza, you must know the following facts: Each slice should have an area of 14.125 inches. To calculate the number of slices, simply divide the area of the pizza by 14.125. The area of the pizza is calculated with this formula: Area = "pi r squared" where pi is approximately 3.14159 and r is the radius (half the the diameter). coding should be in c++PROBLEM: Write a program that prompts the user to input the amount of money that an ATM machine will dispense and then show the breakdown of how many 1000, 500, and 100 peso bill/s are dispensed. The program must display the amount then prompt the user if the transaction will continue or not by choosing between Y (for Yes) and N (for No). If an invalid character is entered, it must display that the user entered an invalid character. The program must also display that the maximum allowable amount is 10,000 and the minimum allowable amount is 100. If the entered amount is greater than 10,000 or less than 100, an error notification must be displayed. Moreover, the entered amount must be exactly divisible by 100. SPECIFICATIONS: - You may only use the codes that we studied under our lectures All lines of codes should have a comment. - Save your cpp file as Surname - PE (Example: Pangaliman - PE.cpp) TEST CASES: If a user inputs an amount less than or equal to 10,000: REMINDER: Maximum…PROBLEM:Write a program that prompts the user to input the amount of money that an ATM machine will dispense and then show the breakdown of how many 1000, 500, and 100 peso bill/s are dispensed. The program must display the amount then prompt the user if the transaction will continue or not by choosing between Y (for Yes) and N (for No). If an invalid character is entered, it must display that the user entered an invalid character. The program must also display that the maximum allowable amount is 10,000 and the minimum allowable amount is 100. If the entered amount is greater than 10,000 or less than 100, an error notification must be displayed. Moreover, the entered amount must be exactly divisible by 100. TEST CASES: If a user inputs an amount less than or equal to 10,000: REMINDER: Maximum amount must only be 10,000 and the minimum amount must not be less than 100 Enter Amount to dispense: 4900The Amount of money you entered is 4900.Do you want to continue your transaction?Enter…