Write a python program to calculate speed of the car by taking distance and time and display the message according to the given conditions: Speed Message 60 to 80 Slow 81 to 100 Medium 101 to 120 High more than 120 Very High otherwise display "LOW SPEED"
Q: Write a python program to read the area of a circle as input and print the message according to the…
A: area = int(input()) if area>=25 and area<=50: print("Small circle") elif area>50 and…
Q: Write a python program to get input choice from the user and perform the operations according to…
A: It is the python program in which user have a choice choice is : 1. cm to m 2. grams to…
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 python program to accept a number and if the number is even calculate Z=y modulus x, by…
A: Code with output given below
Q: Write a Python program that will display all prime numbers within a range (Ask the user where to…
A: Here I have created a function named isPrime(), which checks whether the given number is prime or…
Q: Write a python program that takes a number as an input and print the output based on the below…
A: n = int(input("Enter a number : ")) #Taking user inputif n>=0 and n<=9:…
Q: Write a python program to read the area of a circle as input and print the message according to the…
A: required
Q: Write a python program to calculate the average of the student in 3 courses and display the grade…
A: sub1=int(input("Enter marks of the first subject: "))sub2=int(input("Enter marks of the second…
Q: Write a python program to get the daily sales amount of a company as input and calculate & print the…
A: sales = int(input()) if sales > 75000: print("Profit =",sales * 35/100) elif…
Q: Write a python program that does the following: 1. prompts the user to guess a character 2.…
A: As given question directly says steps/algorithm of program, just code is given below. Follow…
Q: Write a python program to read average bill of a supermarket as input and print the message…
A: avg = int(input()) if avg>=50 and avg<=100: print("Normal") elif avg>=101 and…
Q: Write a python program to accept a number and if the number is even calculate Z=y…
A: Given That Write a python program to accept a number and if the number is even calculate Z=y…
Q: Write a Python program that keeps a number from the user (between 1 and 7) and displays the name of…
A: GIVEN: 1- Write a Python program that keeps a number from the user (between 1 and 7) and displays…
Q: Write a python program that takes a sale amount as an input and print the discount message as given…
A: This problem can be solved using basic conditional statements. Follow the code below for better…
Q: • Write a python program to accept a number and O if the number is even calculate Z=x modulus y, o…
A: As per the requirement program is developed. Algorithm: Step 1: Read the number from the user Step…
Q: Write a Python program that prints (displays): Your name Address Telephone number An example of the…
A: Coded using Python 3.
Q: Write a python program to get input amount from the user display the total bill amount after…
A: Program : amnt = int(input("Enter Amount: ")) if(amnt>0): if amnt<=100: disc =…
Q: Write a python program to check whether a given number is positive or negative
A:
Q: /Write the program to input the value of x and print the following message: X value odd Massage…
A: As there is no programming language mentioned so i attempted this question in c++ language here user…
Q: Write a Python program that will ask the user for the free fall distance in meters, then calculate…
A: h = ( g * t2)/2 t = sqrt( (2*h)/g)
Q: Write a Python program that converts base 10 numbers to any given base (between 2 & 16). Program…
A: Write a Python program that converts base 10 numbers to any given base (between 2 & 16).…
Q: Write a Python program with the statements that computes and reports the results of each of the…
A: x = 2y = -3w = 7z = -10 print("a.", (x/y))print("b.", (w/y/x))print("c.", (z/y%x))print("d.",…
Q: Create a Python program that reads input a number x and prints the value of sin-1(x) in the…
A: Create a Python program that reads input a number x and prints the value of sin-1(x) in the…
Q: Write a Python program to read the temperature of the day and if the temperature is above 45, then…
A: Required: Required code with comments for explanation and screenshot of both code and output has…
Q: Write a python program that asks the user's name and the user's age. The program computes the year…
A: The program is written in Python. Check the program screenshot for the correct indentation. Please…
Q: Write a python program to accept a number and if the number is even calculate Zx modulus y, if…
A: Actually, python is a easiest programming language. It is a dynamically typed programming language.…
Q: Write a python program to read the area of a circle as input and print the messae according to the…
A: Here, Code instructions are given.
Q: Write a python program to accept 4 numbers C,D,E,F as input from user If all the 4 numbers are even,…
A: Take 4 values from user for C, D, E and F Check if all are even than calculate P…
Q: Write a python program to accept 4 numbers A, C, E, F as input from user if all 4 numbers are even,…
A: the python program for the given question is as follows:-
Q: rite a python program to read the area of a circle as input and print the message ac e conditions…
A: Algorithm Start Input area in variable a If a in range (25, 50), print(Small Circle) and go to step…
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: write a python program to accept a number and o if the number is even calculate Z=x modulus y, • If…
A: Program using python: x=int(input("enter value for x:"))y=int(input("enter value for y:"))val =…
Q: Write a python program to get an integer input from the user and do the following: Choice Task <= 20…
A: num = int(input("Enter an integer: ")) # taking an integer from user if num <= 20:…
Q: Write a python program to accept a number and if the number is even calculate Z-y modulus x. by…
A: a= int(input()) if a%2==0: x=int(input()) y=int(input()) z = y%x if a>0: x =…
Q: Consider the value of x=48, y=19, a=48 & b=19, and give the output for the below python program…
A: The given code is: x = 48y = 19a = 48b = 19 while x <= a and y >= b: x = x + 1 y = y - 1…
Q: Write a Python program with the statements that computes and reports the results of each of the…
A: We are given few python statements which we are going to print. statement initialisation given like…
Q: Write a Python script that reads the user's year of birth, then display their age along with one of…
A: Python code for above : from datetime import date # read users year of birth year =…
Q: Consider the value of x=19, y=97, a=19 & b=97, and give the output for the below python program…
A:
Q: Write a python program to accept a number and if the number is even calculate Z=y modulus x, by…
A: a= int(input()) if a%2==0: x=int(input()) y=int(input()) z = y%x if a>0: x =…
Q: Write a python program to calculate the average of the student in 3 courses and display the grade…
A: Please see the step 2
Q: Write a Python Program to Check if a Number is Positive, Negative or 0.
A: Given: Write a Python Program to Check if a Number is Positive, Negative or 0.
Q: Write a python program to calculate the area of circle by taking input radius and print the messages…
A: r=float(input()) area = 3.14 * (r**2) if area>=2.14 and area<=8.0: print("Small circle")…
Q: Write a python program to accept a number and if the number is even calculate Z-y modulus x, by…
A: n=int(input('Enter Number: '))x = int(input('Enter X Number : '))y = int(input('Enter Y Number : '))…
Q: Write a python program to accept a number and if the number is even calculate Z=y modulus x, by…
A: Given: We are given python program details where we have to take a number from the user and check…
Q: Write a Python program to read input a positive integer and check whether the number is a Disarium…
A: Write a Python program to read input a positive integer and check whether the number is a Disarium…
Q: Write a python program that determines the number of days, hours, minutes, and seconds based on the…
A: Program code: # Function convert second into day # hours, minutes and seconds def…
Q: Write a python program to read the area of a circle as input and print the message according to the…
A:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images
- 6.7 In Python, A palindrome is a word or a phrase that is the same when read both forward and backward. Examples are: "bob," "sees," or "never odd or even" (ignoring spaces). Write a program whose input is a word or phrase, and that outputs whether the input is a palindrome. Ex: If the input is: bob the output is: bob is a palindrome Ex: If the input is: bobby the output is: bobby is not a palindrome Hint: Start by removing spaces. Then check if a string is equivalent to it's reverse.A. The original Caesar cypher shifts each character by one: a becomes b, z becomes a, and so on. Let's make it a bit harder, and allow the shifted value to come from the range 1..25 inclusive. Moreover, let the code preserve the letters' case (lower-case letters will remain lower-case) and all non-alphabetical characters should remain untouched. Your task is to write a program which: asks the user for one line of text to encrypt; asks the user for a shift value (an integer number from the range 1..25 - note: you should force the user to enter a valid shift value (don't give up and don't let bad data fool you!) Test your code using the data we've provided. Test data Sample input: abcxyzABCxyz 123 2 Sample output: cdezabCDEzab 123 Sample input: The die is cast 25 Sample output: Sgd chd hr bzrsPYTHON3 Complete the given function, encrypt_text that encrypts the variable text using the provided key by applying a modified version of Caesar’s Cipher with the following rules: The key will contain a word made up of the letters ‘u’ and ‘d’. The cipher will use the key to determine the direction of the shift, with a ‘u’ indicating that the character must be shifted upwards while a ‘d’ indicating a downward shift. The number of characters in the key will determine the number of positions to shift. The given text variable will only contain characters from the ASCII table with values between 32 and 126. If the key is invalid (empty string, contains characters other than u and d) or the text is invalid (empty string), no encryption occurs and the function returns the original text. If the text has more characters than the key, the key will loop through again to accommodate the additional text characters. An iterative approach should be used to solve this problem. Brute force…
- Th e following sta tement should determine if x has a value other than 1 or 2.What is wrong with it?if (x ! = 1 11 x ! = 2)C++ Write a program that flips a fair coin N times. It should calculate the number of times every sequence of consecutive heads appears the sequence of N coin flips. Suppose the result of flipping the coin 10 times is HTHTTHHTTT then a sequence of 1 consecutive heads appears 2 times; a sequence of 2 consecutive heads appears 1 time. Note N is an arbitrarily large number.(python) Assuming the following code, what will the value of x be after the code is executed: x = 15 if x % 2 == 0: x +=5 elif x % 5 == 0: x += 5 elif x % 10 == 0: x = 10 else: x = 0 Answers: a. 0 b. 10 c. 20 d. 25 e. 30
- 1. Countthe number of per character in a given sentence/paragraph. (“Hello World!” H-1,e-1, l-3, o-2…)2. Checkif the input contains characters that are not part of the alphabet. (“a#no”;“#” not part of alphabet)3. Replaceall characters in the paragraph with numbers corresponding to their alphabetnumber. (“Abe” – 125; “bad” – 214)USE JAVA PROGRAMMINGThe code must be in Java The program will ask the user to input the file name then read several series of heart rates from a file, compute the minimum, maximum, and fitness quotient for each series, and output the input data and computed information into a document. The final output should look like in the image given input.txt 3 8 68 69 76 78 77 77 78 80 20 67 69 78 83 83 84 79 82 79 84 83 82 83 84 79 83 80 78 84 84 5 63 71 73 78 76Q10) What would be the output of the following program?Please note that the operation x % 10 (i.e., x modulo 10) is always the same as the rightmost digit of x (e.g., 123 % 10 = 3).
- Q 3.I] Write a Java program to read the length and breadth using console and find the area of the rectangle. If the area is greater than 5oo then find the Perimeter of the rectangle. Area of rectangle=length∗breadth Perimeter of the rectangle=2∗(length breadth)Write each of the following as a C++ expression. (3, 4, 6) 9.0 divided by 5 times c plus 32. The integer value of the character +. Round the decimal number x to the nearest integer. Assign the string C++ Programming is exciting to the variable str. Assign the value of 12 times feet plus inches to totalInches. Increment the value of the int variable i by 1. v = 4/3(3.1416 r3). S = 2(3.1416 r2) + 2(3.1416r)h. a + (b-c)/d(ef - gh) (-b + (b2- 4ac)) / 2a2. Series E (C++) by Jemar Jude Maranga Write a program that will print the n items in the following series: 8 11 14 7 10 13 6... Input A single line containing the value of n 6 Output A single line containing n items of the series 8·11·14·7·10·13